On Sun, Dec 23, 2012 at 7:40 AM, 7stud -- <lists / ruby-forum.com> wrote:
> x = "hello"
> y = "hello"
>
> puts x.object_id
> puts y.object_id
>
> --output:--
> 2151872720
> 2151872540
>
> Quote marks are a String object constructor in ruby.

Maybe a bit more illustrative: executing the _same_ string literal
results in multiple different instances:

irb(main):001:0> 4.times { puts "foo".object_id }
73580460
73580430
73580410
73580370
=> 4

Kind regards

robert


--
remember.guy do |as, often| as.you_can - without end
http://blog.rubybestpractices.com/