{"action":"created","issue":{"url":"https://api.github.com/repos/jruby/jruby/issues/2520","labels_url":"https://api.github.com/repos/jruby/jruby/issues/2520/labels{/name}","comments_url":"https://api.github.com/repos/jruby/jruby/issues/2520/comments","events_url":"https://api.github.com/repos/jruby/jruby/issues/2520/events","html_url":"https://github.com/jruby/jruby/pull/2520","id":55551725,"number":2520,"title":"Move methods from BasicObject to Object","user":{"login":"sferik","id":10308,"avatar_url":"https://avatars.githubusercontent.com/u/10308?v=3","gravatar_id":"","url":"https://api.github.com/users/sferik","html_url":"https://github.com/sferik","followers_url":"https://api.github.com/users/sferik/followers","following_url":"https://api.github.com/users/sferik/following{/other_user}","gists_url":"https://api.github.com/users/sferik/gists{/gist_id}","starred_url":"https://api.github.com/users/sferik/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/sferik/subscriptions","organizations_url":"https://api.github.com/users/sferik/orgs","repos_url":"https://api.github.com/users/sferik/repos","events_url":"https://api.github.com/users/sferik/events{/privacy}","received_events_url":"https://api.github.com/users/sferik/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":1,"created_at":"2015-01-26T23:13:51Z","updated_at":"2015-01-28T19:44:46Z","closed_at":"2015-01-28T19:28:03Z","pull_request":{"url":"https://api.github.com/repos/jruby/jruby/pulls/2520","html_url":"https://github.com/jruby/jruby/pull/2520","diff_url":"https://github.com/jruby/jruby/pull/2520.diff","patch_url":"https://github.com/jruby/jruby/pull/2520.patch"},"body":"In the process of debugging an [unrelated issue](https://github.com/avdi/naught/issues/65#issuecomment-71541149), I came across an inconsistency between JRuby and CRuby: the `#itself` and `#object_id` methods are defined on `BasicObject` instead of `Object`.\r\n\r\n```ruby\r\n> ruby -e \"puts RUBY_DESCRIPTION; p BasicObject.instance_methods.sort\"\r\nruby 2.2.0p0 (2014-12-25 revision 49005) [x86_64-darwin14]\r\n[:!, :!=, :==, :__id__, :__send__, :equal?, :instance_eval, :instance_exec]\r\n> jruby -e \"puts RUBY_DESCRIPTION; p BasicObject.instance_methods.sort\"\r\njruby 9.0.0.0.pre1 (2.2.0p0) 2015-01-20 d537cab Java HotSpot(TM) 64-Bit Server VM 24.51-b03 on 1.7.0_51-b13 +jit [darwin-x86_64]\r\n[:!, :!=, :==, :__id__, :__send__, :equal?, :instance_eval, :instance_exec, :itself, :object_id]\r\n```\r\n\r\n# WARNING #\r\n\r\n![i-have-no-idea-what-im-doing-5](https://cloud.githubusercontent.com/assets/10308/5910159/2ff90322-a56c-11e4-892d-f82bce9ae25d.jpg)\r\n\r\nI am not an expert :coffee: programmer nor am I particularly familiar with the JRuby codebase, however I’ve made an attempt to fix this issue myself, as it appears to be mostly a :scissors: and :spaghetti: job.\r\n\r\nI’ve also attempted to add a test to prevent this behavior from regressing, however I may have put it in the wrong place, as JRuby appears to have multiple test suites.\r\n\r\nI’ve also taken the liberty to remove the `Object#id` method, which was deprecated when Ruby 1.9 was released and removed from CRuby in version 1.9.3."},"comment":{"url":"https://api.github.com/repos/jruby/jruby/issues/comments/71901739","html_url":"https://github.com/jruby/jruby/pull/2520#issuecomment-71901739","issue_url":"https://api.github.com/repos/jruby/jruby/issues/2520","id":71901739,"user":{"login":"chrisseaton","id":341094,"avatar_url":"https://avatars.githubusercontent.com/u/341094?v=3","gravatar_id":"","url":"https://api.github.com/users/chrisseaton","html_url":"https://github.com/chrisseaton","followers_url":"https://api.github.com/users/chrisseaton/followers","following_url":"https://api.github.com/users/chrisseaton/following{/other_user}","gists_url":"https://api.github.com/users/chrisseaton/gists{/gist_id}","starred_url":"https://api.github.com/users/chrisseaton/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/chrisseaton/subscriptions","organizations_url":"https://api.github.com/users/chrisseaton/orgs","repos_url":"https://api.github.com/users/chrisseaton/repos","events_url":"https://api.github.com/users/chrisseaton/events{/privacy}","received_events_url":"https://api.github.com/users/chrisseaton/received_events","type":"User","site_admin":false},"created_at":"2015-01-28T19:44:46Z","updated_at":"2015-01-28T19:44:46Z","body":"@enebo should this be cherry-picked onto 17?"}}