Category talk:Ruby

From Rosetta Code
Revision as of 01:44, 9 March 2011 by rosettacode>Kernigh (Ruby is pass-by-value as you say....)

Pass by reference?

How is Ruby pass-by-reference? The passing of values in Ruby (which are all references) has exactly the same semantics as the passing of reference type values in Java. (Is it not?) Java is listed as pass-by-value only. So to be consistent we should list Ruby as pass-by-value. --76.91.63.71 20:02, 2 August 2009 (UTC)

Ruby is pass-by-value as you say. I changed the page from 'parampass=reference' to 'parampass=value'. I also changed it from 'execution=bytecode' to 'execution=interpreted'. Ruby 1.9 compiles a program to bytecode and executes the bytecode, but this is an internal detail of the interpreter. There is no Java .class or Python .pyc file. --Kernigh 01:44, 9 March 2011 (UTC)