{"action":"created","comment":{"url":"https://api.github.com/repos/manastech/crystal/pulls/comments/36455164","id":36455164,"diff_hunk":"@@ -1306,4 +1306,16 @@ describe \"String\" do\n   it \"gets length of \\0 string\" do\n     \"\\0\\0\".length.should eq(2)\n   end\n+\n+  context \"%\" do\n+    it \"substitutes one placeholder\" do\n+      res = \"change %{this}\" % { \"this\": \"nothing\" }\n+      res.should eq \"change nothing\"\n+    end\n+\n+    it \"substitutes multiple placeholder\" do\n+      res = \"change %{this} and %{more}\" % { \"this\": \"nothing\", \"more\": \"something\" }\n+      res.should eq \"change nothing and something\"\n+    end\n+  end","path":"spec/std/string_spec.cr","position":15,"original_position":15,"commit_id":"f84c86b09f111bffc6ce5fe4da21e25271f816e6","original_commit_id":"f84c86b09f111bffc6ce5fe4da21e25271f816e6","user":{"login":"jhass","id":141294,"avatar_url":"https://avatars.githubusercontent.com/u/141294?v=3","gravatar_id":"","url":"https://api.github.com/users/jhass","html_url":"https://github.com/jhass","followers_url":"https://api.github.com/users/jhass/followers","following_url":"https://api.github.com/users/jhass/following{/other_user}","gists_url":"https://api.github.com/users/jhass/gists{/gist_id}","starred_url":"https://api.github.com/users/jhass/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jhass/subscriptions","organizations_url":"https://api.github.com/users/jhass/orgs","repos_url":"https://api.github.com/users/jhass/repos","events_url":"https://api.github.com/users/jhass/events{/privacy}","received_events_url":"https://api.github.com/users/jhass/received_events","type":"User","site_admin":false},"body":"I think a spec for when no hash is passed and one for when a hash is passed but the key is missing would be good.","created_at":"2015-08-06T19:28:03Z","updated_at":"2015-08-06T19:28:03Z","html_url":"https://github.com/manastech/crystal/pull/1074#discussion_r36455164","pull_request_url":"https://api.github.com/repos/manastech/crystal/pulls/1074","_links":{"self":{"href":"https://api.github.com/repos/manastech/crystal/pulls/comments/36455164"},"html":{"href":"https://github.com/manastech/crystal/pull/1074#discussion_r36455164"},"pull_request":{"href":"https://api.github.com/repos/manastech/crystal/pulls/1074"}}},"pull_request":{"url":"https://api.github.com/repos/manastech/crystal/pulls/1074","id":41404297,"html_url":"https://github.com/manastech/crystal/pull/1074","diff_url":"https://github.com/manastech/crystal/pull/1074.diff","patch_url":"https://github.com/manastech/crystal/pull/1074.patch","issue_url":"https://api.github.com/repos/manastech/crystal/issues/1074","number":1074,"state":"open","locked":false,"title":"Adds a working version of the format (%) method on strings","user":{"login":"zamith","id":166304,"avatar_url":"https://avatars.githubusercontent.com/u/166304?v=3","gravatar_id":"","url":"https://api.github.com/users/zamith","html_url":"https://github.com/zamith","followers_url":"https://api.github.com/users/zamith/followers","following_url":"https://api.github.com/users/zamith/following{/other_user}","gists_url":"https://api.github.com/users/zamith/gists{/gist_id}","starred_url":"https://api.github.com/users/zamith/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/zamith/subscriptions","organizations_url":"https://api.github.com/users/zamith/orgs","repos_url":"https://api.github.com/users/zamith/repos","events_url":"https://api.github.com/users/zamith/events{/privacy}","received_events_url":"https://api.github.com/users/zamith/received_events","type":"User","site_admin":false},"body":"There is a lot more it can do, but just this simple implementation is\r\nhelpful enough, I think. If you wish to learn more about this method,\r\nyou can read the [ruby documentation](http://ruby-doc.org/core-2.2.0/String.html#method-i-25).","created_at":"2015-08-01T16:50:03Z","updated_at":"2015-08-06T19:28:03Z","closed_at":null,"merged_at":null,"merge_commit_sha":"c841ff47b48d6992c8272548d8d514ae911fb832","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/manastech/crystal/pulls/1074/commits","review_comments_url":"https://api.github.com/repos/manastech/crystal/pulls/1074/comments","review_comment_url":"https://api.github.com/repos/manastech/crystal/pulls/comments{/number}","comments_url":"https://api.github.com/repos/manastech/crystal/issues/1074/comments","statuses_url":"https://api.github.com/repos/manastech/crystal/statuses/f84c86b09f111bffc6ce5fe4da21e25271f816e6","head":{"label":"zamith:string_format","ref":"string_format","sha":"f84c86b09f111bffc6ce5fe4da21e25271f816e6","user":{"login":"zamith","id":166304,"avatar_url":"https://avatars.githubusercontent.com/u/166304?v=3","gravatar_id":"","url":"https://api.github.com/users/zamith","html_url":"https://github.com/zamith","followers_url":"https://api.github.com/users/zamith/followers","following_url":"https://api.github.com/users/zamith/following{/other_user}","gists_url":"https://api.github.com/users/zamith/gists{/gist_id}","starred_url":"https://api.github.com/users/zamith/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/zamith/subscriptions","organizations_url":"https://api.github.com/users/zamith/orgs","repos_url":"https://api.github.com/users/zamith/repos","events_url":"https://api.github.com/users/zamith/events{/privacy}","received_events_url":"https://api.github.com/users/zamith/received_events","type":"User","site_admin":false},"repo":{"id":29587912,"name":"crystal","full_name":"zamith/crystal","owner":{"login":"zamith","id":166304,"avatar_url":"https://avatars.githubusercontent.com/u/166304?v=3","gravatar_id":"","url":"https://api.github.com/users/zamith","html_url":"https://github.com/zamith","followers_url":"https://api.github.com/users/zamith/followers","following_url":"https://api.github.com/users/zamith/following{/other_user}","gists_url":"https://api.github.com/users/zamith/gists{/gist_id}","starred_url":"https://api.github.com/users/zamith/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/zamith/subscriptions","organizations_url":"https://api.github.com/users/zamith/orgs","repos_url":"https://api.github.com/users/zamith/repos","events_url":"https://api.github.com/users/zamith/events{/privacy}","received_events_url":"https://api.github.com/users/zamith/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/zamith/crystal","description":"The Crystal Programming Language","fork":true,"url":"https://api.github.com/repos/zamith/crystal","forks_url":"https://api.github.com/repos/zamith/crystal/forks","keys_url":"https://api.github.com/repos/zamith/crystal/keys{/key_id}","collaborators_url":"https://api.github.com/repos/zamith/crystal/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/zamith/crystal/teams","hooks_url":"https://api.github.com/repos/zamith/crystal/hooks","issue_events_url":"https://api.github.com/repos/zamith/crystal/issues/events{/number}","events_url":"https://api.github.com/repos/zamith/crystal/events","assignees_url":"https://api.github.com/repos/zamith/crystal/assignees{/user}","branches_url":"https://api.github.com/repos/zamith/crystal/branches{/branch}","tags_url":"https://api.github.com/repos/zamith/crystal/tags","blobs_url":"https://api.github.com/repos/zamith/crystal/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/zamith/crystal/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/zamith/crystal/git/refs{/sha}","trees_url":"https://api.github.com/repos/zamith/crystal/git/trees{/sha}","statuses_url":"https://api.github.com/repos/zamith/crystal/statuses/{sha}","languages_url":"https://api.github.com/repos/zamith/crystal/languages","stargazers_url":"https://api.github.com/repos/zamith/crystal/stargazers","contributors_url":"https://api.github.com/repos/zamith/crystal/contributors","subscribers_url":"https://api.github.com/repos/zamith/crystal/subscribers","subscription_url":"https://api.github.com/repos/zamith/crystal/subscription","commits_url":"https://api.github.com/repos/zamith/crystal/commits{/sha}","git_commits_url":"https://api.github.com/repos/zamith/crystal/git/commits{/sha}","comments_url":"https://api.github.com/repos/zamith/crystal/comments{/number}","issue_comment_url":"https://api.github.com/repos/zamith/crystal/issues/comments{/number}","contents_url":"https://api.github.com/repos/zamith/crystal/contents/{+path}","compare_url":"https://api.github.com/repos/zamith/crystal/compare/{base}...{head}","merges_url":"https://api.github.com/repos/zamith/crystal/merges","archive_url":"https://api.github.com/repos/zamith/crystal/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/zamith/crystal/downloads","issues_url":"https://api.github.com/repos/zamith/crystal/issues{/number}","pulls_url":"https://api.github.com/repos/zamith/crystal/pulls{/number}","milestones_url":"https://api.github.com/repos/zamith/crystal/milestones{/number}","notifications_url":"https://api.github.com/repos/zamith/crystal/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/zamith/crystal/labels{/name}","releases_url":"https://api.github.com/repos/zamith/crystal/releases{/id}","created_at":"2015-01-21T12:11:20Z","updated_at":"2015-03-04T19:34:56Z","pushed_at":"2015-08-06T17:41:12Z","git_url":"git://github.com/zamith/crystal.git","ssh_url":"git@github.com:zamith/crystal.git","clone_url":"https://github.com/zamith/crystal.git","svn_url":"https://github.com/zamith/crystal","homepage":"http://crystal-lang.org","size":24892,"stargazers_count":0,"watchers_count":0,"language":"Crystal","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":"manastech:master","ref":"master","sha":"853edff171b8fb0b612512eadb3bc22665d431d6","user":{"login":"manastech","id":1354950,"avatar_url":"https://avatars.githubusercontent.com/u/1354950?v=3","gravatar_id":"","url":"https://api.github.com/users/manastech","html_url":"https://github.com/manastech","followers_url":"https://api.github.com/users/manastech/followers","following_url":"https://api.github.com/users/manastech/following{/other_user}","gists_url":"https://api.github.com/users/manastech/gists{/gist_id}","starred_url":"https://api.github.com/users/manastech/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/manastech/subscriptions","organizations_url":"https://api.github.com/users/manastech/orgs","repos_url":"https://api.github.com/users/manastech/repos","events_url":"https://api.github.com/users/manastech/events{/privacy}","received_events_url":"https://api.github.com/users/manastech/received_events","type":"Organization","site_admin":false},"repo":{"id":6887813,"name":"crystal","full_name":"manastech/crystal","owner":{"login":"manastech","id":1354950,"avatar_url":"https://avatars.githubusercontent.com/u/1354950?v=3","gravatar_id":"","url":"https://api.github.com/users/manastech","html_url":"https://github.com/manastech","followers_url":"https://api.github.com/users/manastech/followers","following_url":"https://api.github.com/users/manastech/following{/other_user}","gists_url":"https://api.github.com/users/manastech/gists{/gist_id}","starred_url":"https://api.github.com/users/manastech/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/manastech/subscriptions","organizations_url":"https://api.github.com/users/manastech/orgs","repos_url":"https://api.github.com/users/manastech/repos","events_url":"https://api.github.com/users/manastech/events{/privacy}","received_events_url":"https://api.github.com/users/manastech/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/manastech/crystal","description":"The Crystal Programming Language","fork":false,"url":"https://api.github.com/repos/manastech/crystal","forks_url":"https://api.github.com/repos/manastech/crystal/forks","keys_url":"https://api.github.com/repos/manastech/crystal/keys{/key_id}","collaborators_url":"https://api.github.com/repos/manastech/crystal/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/manastech/crystal/teams","hooks_url":"https://api.github.com/repos/manastech/crystal/hooks","issue_events_url":"https://api.github.com/repos/manastech/crystal/issues/events{/number}","events_url":"https://api.github.com/repos/manastech/crystal/events","assignees_url":"https://api.github.com/repos/manastech/crystal/assignees{/user}","branches_url":"https://api.github.com/repos/manastech/crystal/branches{/branch}","tags_url":"https://api.github.com/repos/manastech/crystal/tags","blobs_url":"https://api.github.com/repos/manastech/crystal/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/manastech/crystal/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/manastech/crystal/git/refs{/sha}","trees_url":"https://api.github.com/repos/manastech/crystal/git/trees{/sha}","statuses_url":"https://api.github.com/repos/manastech/crystal/statuses/{sha}","languages_url":"https://api.github.com/repos/manastech/crystal/languages","stargazers_url":"https://api.github.com/repos/manastech/crystal/stargazers","contributors_url":"https://api.github.com/repos/manastech/crystal/contributors","subscribers_url":"https://api.github.com/repos/manastech/crystal/subscribers","subscription_url":"https://api.github.com/repos/manastech/crystal/subscription","commits_url":"https://api.github.com/repos/manastech/crystal/commits{/sha}","git_commits_url":"https://api.github.com/repos/manastech/crystal/git/commits{/sha}","comments_url":"https://api.github.com/repos/manastech/crystal/comments{/number}","issue_comment_url":"https://api.github.com/repos/manastech/crystal/issues/comments{/number}","contents_url":"https://api.github.com/repos/manastech/crystal/contents/{+path}","compare_url":"https://api.github.com/repos/manastech/crystal/compare/{base}...{head}","merges_url":"https://api.github.com/repos/manastech/crystal/merges","archive_url":"https://api.github.com/repos/manastech/crystal/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/manastech/crystal/downloads","issues_url":"https://api.github.com/repos/manastech/crystal/issues{/number}","pulls_url":"https://api.github.com/repos/manastech/crystal/pulls{/number}","milestones_url":"https://api.github.com/repos/manastech/crystal/milestones{/number}","notifications_url":"https://api.github.com/repos/manastech/crystal/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/manastech/crystal/labels{/name}","releases_url":"https://api.github.com/repos/manastech/crystal/releases{/id}","created_at":"2012-11-27T17:32:32Z","updated_at":"2015-08-06T19:25:25Z","pushed_at":"2015-08-06T19:20:50Z","git_url":"git://github.com/manastech/crystal.git","ssh_url":"git@github.com:manastech/crystal.git","clone_url":"https://github.com/manastech/crystal.git","svn_url":"https://github.com/manastech/crystal","homepage":"http://crystal-lang.org","size":39371,"stargazers_count":2843,"watchers_count":2843,"language":"Crystal","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":true,"forks_count":192,"mirror_url":null,"open_issues_count":206,"forks":192,"open_issues":206,"watchers":2843,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/manastech/crystal/pulls/1074"},"html":{"href":"https://github.com/manastech/crystal/pull/1074"},"issue":{"href":"https://api.github.com/repos/manastech/crystal/issues/1074"},"comments":{"href":"https://api.github.com/repos/manastech/crystal/issues/1074/comments"},"review_comments":{"href":"https://api.github.com/repos/manastech/crystal/pulls/1074/comments"},"review_comment":{"href":"https://api.github.com/repos/manastech/crystal/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/manastech/crystal/pulls/1074/commits"},"statuses":{"href":"https://api.github.com/repos/manastech/crystal/statuses/f84c86b09f111bffc6ce5fe4da21e25271f816e6"}}}}