#1 .NET methods do not override Ruby Object methods

open
nobody
None
5
2012-07-18
2005-07-21
No

if your .NET object implements a method with the same
name as those in Object in Ruby

public class MyClass
{
public int id = 5;
}

and call it from ruby

a = MyClass.new
print a.id

you will not get the expected behavoir, this example
will print the memory address (i believe) of the object
, not 5.

for a list of all Object methods type:-
print Object.new.methods.sort.join("\n")

Discussion


Anonymous

Cancel  Add attachments





Get latest updates about Open Source Projects, Conferences and News.

Sign up for the SourceForge newsletter:





No, thanks