Menu

#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
Anonymous

Add attachments
Cancel





Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.