Class question

Please bear with me if it is already discussed; I am running the
following code
class Tester
def sayHello
hi
puts “I am saying hello”
end

private
def hi
   puts "Did I say hi?"
end

private :hi    #doube checking private

end

p = Tester.new
p.hi
p.sayHello

As per ruby, it should fail but Ironruby runs through without any error.
I am going through the code to see where it is performed.

Thanks.
Unni

Private appears to be broken. Can you submit this as a bug please?

JD

From: [email protected]
[mailto:[email protected]] On Behalf Of Unnikrishnan
Nair
Sent: Wednesday, April 30, 2008 1:52 PM
To: [email protected]
Subject: [Ironruby-core] class question.

Please bear with me if it is already discussed; I am running the
following code
class Tester
def sayHello
hi
puts “I am saying hello”
end

private
def hi
   puts "Did I say hi?"
end

private :hi    #doube checking private

end

p = Tester.new
p.hi
p.sayHello

As per ruby, it should fail but Ironruby runs through without any error.
I am going through the code to see where it is performed.

Thanks.
Unni