Actions
Bug #9141
closeddefine_singleton_method creates private method
Status:
Closed
Assignee:
-
Target version:
-
ruby -v:
ruby 2.1.0dev (2013-09-22 trunk 43011) [x86_64-darwin12.5.0]
Description
Hello,
I stumbled upon the following problem:
irb(main):001:0> guy = "Bob"
=> "Bob"
irb(main):002:0> guy.define_singleton_method(:hello) { "#{self}: Hello there!" }
=> :hello
irb(main):003:0> guy.hello
NoMethodError: private method `hello' called for "Bob":String
from (irb):3
Actions
Like0
Like0Like0Like0