{"action":"created","comment":{"url":"https://api.github.com/repos/jruby/jruby/pulls/comments/26592363","id":26592363,"diff_hunk":"@@ -612,6 +612,29 @@ def flatten!(level=-1)\n     nil\n   end\n \n+\n+  def inspect\n+    return \"[]\".force_encoding(Encoding::US_ASCII) if @total == 0\n+    comma = \", \"\n+    result = \"[\"\n+\n+    return \"[...]\" if Thread.detect_recursion self do\n+      each_with_index do |element, index|\n+        temp = element.inspect\n+        result.force_encoding(temp.encoding) if index == 0\n+        result << temp << comma\n+      end\n+    end\n+\n+    Rubinius::Type.infect(result, self)\n+    #result.shorten!(2) # MODIFIED We don't implement string shorten.","path":"truffle/src/main/ruby/core/rubinius/common/array.rb","position":19,"original_position":19,"commit_id":"1ef45038952099489b3f0e0ae8c3b1e0bc0eeb81","original_commit_id":"1ef45038952099489b3f0e0ae8c3b1e0bc0eeb81","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},"body":"We'd rather you left inspect as exactly in the Rubinius code, and then implement an empty `shorten!` as a shim - like this https://github.com/jruby/jruby/blob/master/truffle/src/main/ruby/core/shims.rb#L59-L60.\r\n\r\nIt's possible that this will cause problems later when we shimmed methods that silently do nothing, but at least they're easy to search for and understand. It's worked well for us so far.","created_at":"2015-03-17T17:02:05Z","updated_at":"2015-03-17T17:02:05Z","html_url":"https://github.com/jruby/jruby/pull/2711#discussion_r26592363","pull_request_url":"https://api.github.com/repos/jruby/jruby/pulls/2711","_links":{"self":{"href":"https://api.github.com/repos/jruby/jruby/pulls/comments/26592363"},"html":{"href":"https://github.com/jruby/jruby/pull/2711#discussion_r26592363"},"pull_request":{"href":"https://api.github.com/repos/jruby/jruby/pulls/2711"}}},"pull_request":{"url":"https://api.github.com/repos/jruby/jruby/pulls/2711","id":31293583,"html_url":"https://github.com/jruby/jruby/pull/2711","diff_url":"https://github.com/jruby/jruby/pull/2711.diff","patch_url":"https://github.com/jruby/jruby/pull/2711.patch","issue_url":"https://api.github.com/repos/jruby/jruby/issues/2711","number":2711,"state":"open","locked":false,"title":"[Truffle] Moving Array#to_s to array.rb","user":{"login":"bjfish","id":110023,"avatar_url":"https://avatars.githubusercontent.com/u/110023?v=3","gravatar_id":"","url":"https://api.github.com/users/bjfish","html_url":"https://github.com/bjfish","followers_url":"https://api.github.com/users/bjfish/followers","following_url":"https://api.github.com/users/bjfish/following{/other_user}","gists_url":"https://api.github.com/users/bjfish/gists{/gist_id}","starred_url":"https://api.github.com/users/bjfish/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/bjfish/subscriptions","organizations_url":"https://api.github.com/users/bjfish/orgs","repos_url":"https://api.github.com/users/bjfish/repos","events_url":"https://api.github.com/users/bjfish/events{/privacy}","received_events_url":"https://api.github.com/users/bjfish/received_events","type":"User","site_admin":false},"body":"","created_at":"2015-03-16T23:07:41Z","updated_at":"2015-03-17T17:02:05Z","closed_at":null,"merged_at":null,"merge_commit_sha":"911c11b67a358dfca54808e97664c7a3df556dfb","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/jruby/jruby/pulls/2711/commits","review_comments_url":"https://api.github.com/repos/jruby/jruby/pulls/2711/comments","review_comment_url":"https://api.github.com/repos/jruby/jruby/pulls/comments{/number}","comments_url":"https://api.github.com/repos/jruby/jruby/issues/2711/comments","statuses_url":"https://api.github.com/repos/jruby/jruby/statuses/1ef45038952099489b3f0e0ae8c3b1e0bc0eeb81","head":{"label":"bjfish:truffle_array_to_s","ref":"truffle_array_to_s","sha":"1ef45038952099489b3f0e0ae8c3b1e0bc0eeb81","user":{"login":"bjfish","id":110023,"avatar_url":"https://avatars.githubusercontent.com/u/110023?v=3","gravatar_id":"","url":"https://api.github.com/users/bjfish","html_url":"https://github.com/bjfish","followers_url":"https://api.github.com/users/bjfish/followers","following_url":"https://api.github.com/users/bjfish/following{/other_user}","gists_url":"https://api.github.com/users/bjfish/gists{/gist_id}","starred_url":"https://api.github.com/users/bjfish/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/bjfish/subscriptions","organizations_url":"https://api.github.com/users/bjfish/orgs","repos_url":"https://api.github.com/users/bjfish/repos","events_url":"https://api.github.com/users/bjfish/events{/privacy}","received_events_url":"https://api.github.com/users/bjfish/received_events","type":"User","site_admin":false},"repo":{"id":31230576,"name":"jruby","full_name":"bjfish/jruby","owner":{"login":"bjfish","id":110023,"avatar_url":"https://avatars.githubusercontent.com/u/110023?v=3","gravatar_id":"","url":"https://api.github.com/users/bjfish","html_url":"https://github.com/bjfish","followers_url":"https://api.github.com/users/bjfish/followers","following_url":"https://api.github.com/users/bjfish/following{/other_user}","gists_url":"https://api.github.com/users/bjfish/gists{/gist_id}","starred_url":"https://api.github.com/users/bjfish/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/bjfish/subscriptions","organizations_url":"https://api.github.com/users/bjfish/orgs","repos_url":"https://api.github.com/users/bjfish/repos","events_url":"https://api.github.com/users/bjfish/events{/privacy}","received_events_url":"https://api.github.com/users/bjfish/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/bjfish/jruby","description":"JRuby, an implementation of Ruby on the JVM","fork":true,"url":"https://api.github.com/repos/bjfish/jruby","forks_url":"https://api.github.com/repos/bjfish/jruby/forks","keys_url":"https://api.github.com/repos/bjfish/jruby/keys{/key_id}","collaborators_url":"https://api.github.com/repos/bjfish/jruby/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/bjfish/jruby/teams","hooks_url":"https://api.github.com/repos/bjfish/jruby/hooks","issue_events_url":"https://api.github.com/repos/bjfish/jruby/issues/events{/number}","events_url":"https://api.github.com/repos/bjfish/jruby/events","assignees_url":"https://api.github.com/repos/bjfish/jruby/assignees{/user}","branches_url":"https://api.github.com/repos/bjfish/jruby/branches{/branch}","tags_url":"https://api.github.com/repos/bjfish/jruby/tags","blobs_url":"https://api.github.com/repos/bjfish/jruby/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/bjfish/jruby/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/bjfish/jruby/git/refs{/sha}","trees_url":"https://api.github.com/repos/bjfish/jruby/git/trees{/sha}","statuses_url":"https://api.github.com/repos/bjfish/jruby/statuses/{sha}","languages_url":"https://api.github.com/repos/bjfish/jruby/languages","stargazers_url":"https://api.github.com/repos/bjfish/jruby/stargazers","contributors_url":"https://api.github.com/repos/bjfish/jruby/contributors","subscribers_url":"https://api.github.com/repos/bjfish/jruby/subscribers","subscription_url":"https://api.github.com/repos/bjfish/jruby/subscription","commits_url":"https://api.github.com/repos/bjfish/jruby/commits{/sha}","git_commits_url":"https://api.github.com/repos/bjfish/jruby/git/commits{/sha}","comments_url":"https://api.github.com/repos/bjfish/jruby/comments{/number}","issue_comment_url":"https://api.github.com/repos/bjfish/jruby/issues/comments{/number}","contents_url":"https://api.github.com/repos/bjfish/jruby/contents/{+path}","compare_url":"https://api.github.com/repos/bjfish/jruby/compare/{base}...{head}","merges_url":"https://api.github.com/repos/bjfish/jruby/merges","archive_url":"https://api.github.com/repos/bjfish/jruby/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/bjfish/jruby/downloads","issues_url":"https://api.github.com/repos/bjfish/jruby/issues{/number}","pulls_url":"https://api.github.com/repos/bjfish/jruby/pulls{/number}","milestones_url":"https://api.github.com/repos/bjfish/jruby/milestones{/number}","notifications_url":"https://api.github.com/repos/bjfish/jruby/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/bjfish/jruby/labels{/name}","releases_url":"https://api.github.com/repos/bjfish/jruby/releases{/id}","created_at":"2015-02-23T21:23:47Z","updated_at":"2015-03-17T04:09:09Z","pushed_at":"2015-03-17T14:34:37Z","git_url":"git://github.com/bjfish/jruby.git","ssh_url":"git@github.com:bjfish/jruby.git","clone_url":"https://github.com/bjfish/jruby.git","svn_url":"https://github.com/bjfish/jruby","homepage":"http://www.jruby.org","size":163485,"stargazers_count":0,"watchers_count":0,"language":"Ruby","has_issues":false,"has_downloads":true,"has_wiki":true,"has_pages":true,"forks_count":0,"mirror_url":null,"open_issues_count":0,"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"jruby:master","ref":"master","sha":"2c657d47c83705ef5a85c58c7f62a5f0d30e5299","user":{"login":"jruby","id":55687,"avatar_url":"https://avatars.githubusercontent.com/u/55687?v=3","gravatar_id":"","url":"https://api.github.com/users/jruby","html_url":"https://github.com/jruby","followers_url":"https://api.github.com/users/jruby/followers","following_url":"https://api.github.com/users/jruby/following{/other_user}","gists_url":"https://api.github.com/users/jruby/gists{/gist_id}","starred_url":"https://api.github.com/users/jruby/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jruby/subscriptions","organizations_url":"https://api.github.com/users/jruby/orgs","repos_url":"https://api.github.com/users/jruby/repos","events_url":"https://api.github.com/users/jruby/events{/privacy}","received_events_url":"https://api.github.com/users/jruby/received_events","type":"Organization","site_admin":false},"repo":{"id":168370,"name":"jruby","full_name":"jruby/jruby","owner":{"login":"jruby","id":55687,"avatar_url":"https://avatars.githubusercontent.com/u/55687?v=3","gravatar_id":"","url":"https://api.github.com/users/jruby","html_url":"https://github.com/jruby","followers_url":"https://api.github.com/users/jruby/followers","following_url":"https://api.github.com/users/jruby/following{/other_user}","gists_url":"https://api.github.com/users/jruby/gists{/gist_id}","starred_url":"https://api.github.com/users/jruby/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jruby/subscriptions","organizations_url":"https://api.github.com/users/jruby/orgs","repos_url":"https://api.github.com/users/jruby/repos","events_url":"https://api.github.com/users/jruby/events{/privacy}","received_events_url":"https://api.github.com/users/jruby/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/jruby/jruby","description":"JRuby, an implementation of Ruby on the JVM","fork":false,"url":"https://api.github.com/repos/jruby/jruby","forks_url":"https://api.github.com/repos/jruby/jruby/forks","keys_url":"https://api.github.com/repos/jruby/jruby/keys{/key_id}","collaborators_url":"https://api.github.com/repos/jruby/jruby/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/jruby/jruby/teams","hooks_url":"https://api.github.com/repos/jruby/jruby/hooks","issue_events_url":"https://api.github.com/repos/jruby/jruby/issues/events{/number}","events_url":"https://api.github.com/repos/jruby/jruby/events","assignees_url":"https://api.github.com/repos/jruby/jruby/assignees{/user}","branches_url":"https://api.github.com/repos/jruby/jruby/branches{/branch}","tags_url":"https://api.github.com/repos/jruby/jruby/tags","blobs_url":"https://api.github.com/repos/jruby/jruby/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/jruby/jruby/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/jruby/jruby/git/refs{/sha}","trees_url":"https://api.github.com/repos/jruby/jruby/git/trees{/sha}","statuses_url":"https://api.github.com/repos/jruby/jruby/statuses/{sha}","languages_url":"https://api.github.com/repos/jruby/jruby/languages","stargazers_url":"https://api.github.com/repos/jruby/jruby/stargazers","contributors_url":"https://api.github.com/repos/jruby/jruby/contributors","subscribers_url":"https://api.github.com/repos/jruby/jruby/subscribers","subscription_url":"https://api.github.com/repos/jruby/jruby/subscription","commits_url":"https://api.github.com/repos/jruby/jruby/commits{/sha}","git_commits_url":"https://api.github.com/repos/jruby/jruby/git/commits{/sha}","comments_url":"https://api.github.com/repos/jruby/jruby/comments{/number}","issue_comment_url":"https://api.github.com/repos/jruby/jruby/issues/comments{/number}","contents_url":"https://api.github.com/repos/jruby/jruby/contents/{+path}","compare_url":"https://api.github.com/repos/jruby/jruby/compare/{base}...{head}","merges_url":"https://api.github.com/repos/jruby/jruby/merges","archive_url":"https://api.github.com/repos/jruby/jruby/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/jruby/jruby/downloads","issues_url":"https://api.github.com/repos/jruby/jruby/issues{/number}","pulls_url":"https://api.github.com/repos/jruby/jruby/pulls{/number}","milestones_url":"https://api.github.com/repos/jruby/jruby/milestones{/number}","notifications_url":"https://api.github.com/repos/jruby/jruby/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/jruby/jruby/labels{/name}","releases_url":"https://api.github.com/repos/jruby/jruby/releases{/id}","created_at":"2009-04-05T03:54:35Z","updated_at":"2015-03-17T16:58:56Z","pushed_at":"2015-03-17T16:58:55Z","git_url":"git://github.com/jruby/jruby.git","ssh_url":"git@github.com:jruby/jruby.git","clone_url":"https://github.com/jruby/jruby.git","svn_url":"https://github.com/jruby/jruby","homepage":"http://www.jruby.org","size":326191,"stargazers_count":2051,"watchers_count":2051,"language":"Ruby","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":true,"forks_count":559,"mirror_url":null,"open_issues_count":736,"forks":559,"open_issues":736,"watchers":2051,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/jruby/jruby/pulls/2711"},"html":{"href":"https://github.com/jruby/jruby/pull/2711"},"issue":{"href":"https://api.github.com/repos/jruby/jruby/issues/2711"},"comments":{"href":"https://api.github.com/repos/jruby/jruby/issues/2711/comments"},"review_comments":{"href":"https://api.github.com/repos/jruby/jruby/pulls/2711/comments"},"review_comment":{"href":"https://api.github.com/repos/jruby/jruby/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/jruby/jruby/pulls/2711/commits"},"statuses":{"href":"https://api.github.com/repos/jruby/jruby/statuses/1ef45038952099489b3f0e0ae8c3b1e0bc0eeb81"}}}}