Ruby Koans -- about_nil

I just started learning Ruby. I am already well-versed in C programming,
doing it from 5 years. I started learning from Ruby-Koans
(http://rubykoans.com/) and ran the test "about_nil.rb" but can not seem
to understand to change on that particular line in question:

  assert_equal __, nil.is_a?(Object), "Unlike NULL in other languages"

[arnuld@arch64 koans $] ruby about_nil.rb
AboutNil#test_nil_is_an_object has damaged your karma.

The Master says:
  You have not yet reached enlightenment.
  I sense frustration. Do not be afraid to ask for help.

The answers you seek...
  Unlike NULL in other languages

Please meditate on the following code:
  about_nil.rb:5:in `test_nil_is_an_object'

mountains are merely mountains
your path thus far [X_________________________________________________]
0/3
[arnuld@arch64 koans $] ruby -v
ruby 2.2.0p0 (2014-12-25 revision 49005) [x86_64-linux]

···

--


Notice the test name: test_nil_is_an_object
and then the assert is asking: nil.is_a?(Object)

the answer is: true
nil is an Object

···

"ruby-talk" <ruby-talk-bounces@ruby-lang.org> wrote on 01/23/2015 08:13:40 AM:

From: arnuld uttre <arnuld.mizong@gmail.com>
To: ruby-talk@ruby-lang.org
Date: 01/23/2015 08:14 AM
Subject: Ruby Koans -- about_nil
Sent by: "ruby-talk" <ruby-talk-bounces@ruby-lang.org>

I just started learning Ruby. I am already well-versed in C programming,
doing it from 5 years. I started learning from Ruby-Koans
(http://rubykoans.com/\) and ran the test "about_nil.rb" but can not seem
to understand to change on that particular line in question:

  assert_equal __, nil.is_a?(Object), "Unlike NULL in other languages"

[arnuld@arch64 koans $] ruby about_nil.rb
AboutNil#test_nil_is_an_object has damaged your karma.

The Master says:
  You have not yet reached enlightenment.
  I sense frustration. Do not be afraid to ask for help.

The answers you seek...
  Unlike NULL in other languages

Please meditate on the following code:
  about_nil.rb:5:in `test_nil_is_an_object'

mountains are merely mountains
your path thus far [X_________________________________________________]
0/3
[arnuld@arch64 koans $] ruby -v
ruby 2.2.0p0 (2014-12-25 revision 49005) [x86_64-linux]

--
Extract of Programming | My Ruminations on Software
http://uttre.wordpress.com/

Ok, I understood. But how to tell this to the program ? What does this
koan want me to add/remove from that line of code ?

I checked the official docementation at:

and does not explain "assert_equal__", it only explans "assert_equal"
(without the 2 underscores) and even that "assert_equal" is explained
without telling the definition of "objects are equal" , deos iequal
mean same object in memory or just the valuos of those

···

On 1/23/15, HANSEM1@nationwide.com > <HANSEM1@nationwide.com> wrote:
"ruby-talk" <ruby-talk-bounces@ruby-lang.org>
wrote on 01/23/2015 08:13:40 > AM:

Notice the test name: test_nil_is_an_object
and then the assert is asking: nil.is_a?(Object)

the answer is: true
nil is an Object

--

From: arnuld uttre <arnuld.mizong@gmail.com>
To: Ruby users <ruby-talk@ruby-lang.org>
Date: 01/23/2015 08:59 AM
Subject: Re: Ruby Koans -- about_nil
Sent by: "ruby-talk" <ruby-talk-bounces@ruby-lang.org>

> "ruby-talk" <ruby-talk-bounces@ruby-lang.org>

> Notice the test name: test_nil_is_an_object
> and then the assert is asking: nil.is_a?(Object)
>
> the answer is: true
> nil is an Object

Ok, I understood. But how to tell this to the program ? What does this
koan want me to add/remove from that line of code ?

I checked the official docementation at:

and does not explain "assert_equal__", it only explans "assert_equal"
(without the 2 underscores) and even that "assert_equal" is explained
without telling the definition of "objects are equal" , deos iequal
mean same object in memory or just the valuos of those

--
http://uttre.wordpress.com/
Extract of Programming | My Ruminations on Software

Ok, I think I more fully understand your question/issue.

  assert_equal __, nil.is_a?(Object), "Unlike NULL in other languages"

the __ is a variable that has been defined in the project, and it's not
the expected answer
the reason you don't see what you might consider a more helpful error is
that this assert was given a message to display "Unlike ... "
if you remove the last comma and the message and re-run the code you will
see a message like:
        expected: true, got: ???
where the ??? is whatever __ was defined as

the test is expecting you to replace the __ with true

···

"ruby-talk" <ruby-talk-bounces@ruby-lang.org> wrote on 01/23/2015 08:57:48 AM:

> On 1/23/15, HANSEM1@nationwide.com > > <HANSEM1@nationwide.com> wrote:
> wrote on 01/23/2015 08:13:40 > > AM:

you're missing a space.

go find it.

···

On Fri, 23 Jan 2015 19:27:48 +0530 arnuld uttre <arnuld.mizong@gmail.com> wrote:

> On 1/23/15, HANSEM1@nationwide.com > > <HANSEM1@nationwide.com> wrote:
> "ruby-talk" <ruby-talk-bounces@ruby-lang.org>
> wrote on 01/23/2015 08:13:40 > > AM:

> Notice the test name: test_nil_is_an_object
> and then the assert is asking: nil.is_a?(Object)
>
> the answer is: true
> nil is an Object

Ok, I understood. But how to tell this to the program ? What does this
koan want me to add/remove from that line of code ?

I checked the official docementation at:
Module: Test::Unit::Assertions (Ruby 2.0.0)

and does not explain "assert_equal__", it only explans "assert_equal"
(without the 2 underscores) and even that "assert_equal" is explained
without telling the definition of "objects are equal" , deos iequal
mean same object in memory or just the valuos of those

--
http://uttre.wordpress.com/
Extract of Programming | My Ruminations on Software

One single space caused so much of mess in the mind. I did solve it
before I checked your and madman's replies by banging my head for an
hour, only to find that all of my understanding was "blocked" by not
looking at one single space.

Thanks for the help though. I think this koans-method of learning is
good for newbies to programming. I will check other documentation, I
like reading reference manuals more, textbooks bore me.

···

On 1/23/15, HANSEM1@nationwide.com > <HANSEM1@nationwide.com> wrote:
"ruby-talk" <ruby-talk-bounces@ruby-lang.org>
wrote on 01/23/2015 08:57:48 AM:

Ok, I think I more fully understand your question/issue.

  assert_equal __, nil.is_a?(Object), "Unlike NULL in other languages"

the __ is a variable that has been defined in the project, and it's not
the expected answer
.. SNIP...

--

Welcome to programming! :slight_smile:

When you're done with the koans, http://testfirst.org/learn_ruby might
be a good next step.

- A

···

On Fri, Jan 23, 2015 at 9:40 AM, arnuld uttre <arnuld.mizong@gmail.com> wrote:

One single space caused so much of mess in the mind.

--
Alex Chaffee - alex@stinky.com
http://alexchaffee.com
http://codelikethis.com
http://twitter.com/alexch

or just pike up the pickaxe book and read it in overview mode

will be a very good experience

Thread name: "Re: Ruby Koans -- about_nil"
Mail number: 7
In reply to: Alex Chaffee

···

Date: Fri, Jan 23, 2015

On Fri, Jan 23, 2015 at 9:40 AM, arnuld uttre <arnuld.mizong@gmail.com> wrote:
> One single space caused so much of mess in the mind.

Welcome to programming! :slight_smile:

When you're done with the koans, http://testfirst.org/learn_ruby might
be a good next step.

- A

--
Alex Chaffee - alex@stinky.com
http://alexchaffee.com
http://codelikethis.com
http://twitter.com/alexch

I actually hate that we still lovingly call "Programming Ruby 1.9 & 2.0 (4th edition): The Pragmatic Programmers' Guide" the pickaxe book... I hate it because if you don't know the real title, it can make it hard to locate. :wink:

https://pragprog.com/book/ruby4/programming-ruby-1-9-2-0

-Wayne

···

--------------------------------------------
On Fri, 1/23/15, Lázaro Armando <lazaro@hcg.sld.cu> wrote:

Subject: Re: Ruby Koans -- about_nil
To: "Ruby users" <ruby-talk@ruby-lang.org>
Date: Friday, January 23, 2015, 8:54 AM

or just pike up the
pickaxe book and read it in overview mode

will be a very good
experience

Yup I had no idea what the pickaxe book was. Thanks for clarifying Wayne.

Jonathan

···

On Sat, Jan 24, 2015 at 2:00 AM, Wayne Brisette <wbrisett@att.net> wrote:

I actually hate that we still lovingly call "Programming Ruby 1.9 & 2.0
(4th edition): The Pragmatic Programmers' Guide" the pickaxe book... I hate
it because if you don't know the real title, it can make it hard to locate.
:wink:

Search

-Wayne

--------------------------------------------
On Fri, 1/23/15, Lázaro Armando <lazaro@hcg.sld.cu> wrote:

Subject: Re: Ruby Koans -- about_nil
To: "Ruby users" <ruby-talk@ruby-lang.org>
Date: Friday, January 23, 2015, 8:54 AM

or just pike up the
pickaxe book and read it in overview mode

will be a very good
experience

https://www.google.com/search?q=pickaxe+book

http://www.amazon.com/s/?url=search-alias%3Daps&field-keywords=pickaxe+book

Really doesn't seem unclear. Maybe you should hate less, or at least hate more important things.

···

On Jan 23, 2015, at 07:00, Wayne Brisette <wbrisett@att.net> wrote:

I actually hate that we still lovingly call "Programming Ruby 1.9 & 2.0 (4th edition): The Pragmatic Programmers' Guide" the pickaxe book... I hate it because if you don't know the real title, it can make it hard to locate. :wink:

Search

Ryan, don’t take it wrong, but I’m a stickler for calling books by their real title. :wink:

But you are right there are bigger things to worry about.

-Wayne

Sent from Yahoo Mail for iPad

What is the difference between Pickaxe and "The Reby Programming
Language" by Matz and David ? Can't I use anyone for learning Ruby ?

···

On 1/24/15, Ryan Davis <ryand-ruby@zenspider.com> wrote:

pickaxe book - Google Search

Amazon.com : pickaxe book

Really doesn't seem unclear. Maybe you should hate less, or at least hate
more important things.

--