{"action":"closed","issue":{"url":"https://api.github.com/repos/jruby/jruby/issues/2463","labels_url":"https://api.github.com/repos/jruby/jruby/issues/2463/labels{/name}","comments_url":"https://api.github.com/repos/jruby/jruby/issues/2463/comments","events_url":"https://api.github.com/repos/jruby/jruby/issues/2463/events","html_url":"https://github.com/jruby/jruby/issues/2463","id":54469648,"number":2463,"title":"Calling Kernel method in a subclass of SimpleDelegator fails with TypeError: bind argument must be an instance of Kernel","user":{"login":"jirutka","id":949228,"avatar_url":"https://avatars.githubusercontent.com/u/949228?v=3","gravatar_id":"","url":"https://api.github.com/users/jirutka","html_url":"https://github.com/jirutka","followers_url":"https://api.github.com/users/jirutka/followers","following_url":"https://api.github.com/users/jirutka/following{/other_user}","gists_url":"https://api.github.com/users/jirutka/gists{/gist_id}","starred_url":"https://api.github.com/users/jirutka/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jirutka/subscriptions","organizations_url":"https://api.github.com/users/jirutka/orgs","repos_url":"https://api.github.com/users/jirutka/repos","events_url":"https://api.github.com/users/jirutka/events{/privacy}","received_events_url":"https://api.github.com/users/jirutka/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":2,"created_at":"2015-01-15T16:25:46Z","updated_at":"2015-01-15T20:38:19Z","closed_at":"2015-01-15T20:38:19Z","body":"**Minimal working example:**\r\n\r\n```ruby\r\nrequire 'delegate'\r\n\r\nclass MyDelegator < SimpleDelegator\r\n\r\n  def initialize\r\n    super String\r\n  end\r\n\r\n  def warn_me\r\n    warn 'FIRE!'\r\n  end\r\nend\r\n\r\nMyDelegator.new.warn_me\r\n```\r\n\r\n**Expected output:**\r\n```\r\nFIRE!\r\n```\r\n\r\nTested on MRI 1.9.3, 2.1.2 and 2.2.0.\r\n\r\n**Actual output on jruby-9000-dev:**\r\n```\r\nTypeError: bind argument must be an instance of Kernel\r\n            bind at org/jruby/RubyUnboundMethod.java:105\r\n  method_missing at /Users/jimmy/.rbenv/versions/jruby-9000-dev/lib/ruby/stdlib/delegate.rb:89\r\n       warn_me_3 at delegator.rb:10\r\n      __script__ at delegator.rb:14\r\n```\r\nTested on:\r\n```\r\njruby 9.0.0.0-SNAPSHOT (2.2.0p0) 2015-01-15 4142c8d Java HotSpot(TM) 64-Bit Server VM 25.0-b70 on 1.8.0-b132 +jit [darwin-x86_64]\r\n```\r\n\r\n**Workaround:**\r\n\r\n```ruby\r\nrequire 'delegate'\r\n\r\nclass SimpleDelegator\r\n  def warn(*msg)\r\n    Kernel.warn(*msg)\r\n  end\r\nend\r\n```\r\n\r\n"}}