def something(var)
  puts var.object_id
  var = 'world'
...

Ruby On Yield by 'reference'

by Damir, October 24, 2008 17:44

It should not, because you ...

D28da594945b3665f6c06bd4e7dc8e10 Talk
str = "Hello"
str_cp = str       # assign the reference to str to another object

...

Ruby On Yield by 'reference'

by Damir, October 24, 2008 11:28

Yes it would. But again: St...

D28da594945b3665f6c06bd4e7dc8e10 Talk

Ruby On Yield by 'reference'

by Damir, October 24, 2008 01:46

Nice to know that yield ret...

D28da594945b3665f6c06bd4e7dc8e10 Talk
class Mutablenum
  attr_accessor :value

...

Ruby On Yield by 'reference'

by Damir, October 24, 2008 00:45

The problem is that Fixnum ...

D28da594945b3665f6c06bd4e7dc8e10 Talk