From: "nobu (Nobuyoshi Nakada)" Date: 2013-12-24T16:34:12+09:00 Subject: [ruby-core:59294] [ruby-trunk - Bug #9141] define_singleton_method creates private method Issue #9141 has been updated by nobu (Nobuyoshi Nakada). Backport changed from 1.9.3: UNKNOWN, 2.0.0: UNKNOWN to 1.9.3: DONTNEED, 2.0.0: DONTNEED, 2.1.0: REQUIRED ---------------------------------------- Bug #9141: define_singleton_method creates private method https://bugs.ruby-lang.org/issues/9141#change-43867 Author: Soilent (H H) Status: Closed Priority: Normal Assignee: Category: Target version: ruby -v: ruby 2.1.0dev (2013-09-22 trunk 43011) [x86_64-darwin12.5.0] Backport: 1.9.3: DONTNEED, 2.0.0: DONTNEED, 2.1.0: REQUIRED 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 -- http://bugs.ruby-lang.org/