{"action":"created","comment":{"url":"https://api.github.com/repos/sinatra/sinatra/pulls/comments/240025070","pull_request_review_id":182966310,"id":240025070,"node_id":"MDI0OlB1bGxSZXF1ZXN0UmV2aWV3Q29tbWVudDI0MDAyNTA3MA==","diff_hunk":"@@ -171,9 +171,15 @@ def clear_content_for(key)\n     #\n     # Would pass <tt>1</tt> and <tt>2</tt> to all the blocks registered\n     # for <tt>:head</tt>.\n-    def yield_content(key, *args)\n-      return yield(*args) if block_given? && content_blocks[key.to_sym].empty?\n-      content_blocks[key.to_sym].map { |b| capture(*args, &b) }.join\n+    def yield_content(key, *args, &block)\n+      if block_given? && !content_for?(key)\n+        haml? ? capture_haml(*args, &block) : yield(*args)\n+      else\n+        content = content_blocks[key.to_sym].map { |b| capture(*args, &b) }\n+        content.join.tap do |c|\n+          @_out_buf << c if block_given? && erb?\n+        end","path":"sinatra-contrib/lib/sinatra/content_for.rb","position":25,"original_position":23,"commit_id":"5643293b8fc6c8ed0838046aeb37145804f79239","original_commit_id":"338e877987712709883ec9c3e821ec4e6475e60b","user":{"login":"namusyaka","id":309329,"node_id":"MDQ6VXNlcjMwOTMyOQ==","avatar_url":"https://avatars0.githubusercontent.com/u/309329?v=4","gravatar_id":"","url":"https://api.github.com/users/namusyaka","html_url":"https://github.com/namusyaka","followers_url":"https://api.github.com/users/namusyaka/followers","following_url":"https://api.github.com/users/namusyaka/following{/other_user}","gists_url":"https://api.github.com/users/namusyaka/gists{/gist_id}","starred_url":"https://api.github.com/users/namusyaka/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/namusyaka/subscriptions","organizations_url":"https://api.github.com/users/namusyaka/orgs","repos_url":"https://api.github.com/users/namusyaka/repos","events_url":"https://api.github.com/users/namusyaka/events{/privacy}","received_events_url":"https://api.github.com/users/namusyaka/received_events","type":"User","site_admin":false},"body":"That makes sense.","created_at":"2018-12-09T06:16:17Z","updated_at":"2018-12-09T06:16:17Z","html_url":"https://github.com/sinatra/sinatra/pull/1500#discussion_r240025070","pull_request_url":"https://api.github.com/repos/sinatra/sinatra/pulls/1500","author_association":"MEMBER","_links":{"self":{"href":"https://api.github.com/repos/sinatra/sinatra/pulls/comments/240025070"},"html":{"href":"https://github.com/sinatra/sinatra/pull/1500#discussion_r240025070"},"pull_request":{"href":"https://api.github.com/repos/sinatra/sinatra/pulls/1500"}},"in_reply_to_id":240009864},"pull_request":{"url":"https://api.github.com/repos/sinatra/sinatra/pulls/1500","id":235082256,"node_id":"MDExOlB1bGxSZXF1ZXN0MjM1MDgyMjU2","html_url":"https://github.com/sinatra/sinatra/pull/1500","diff_url":"https://github.com/sinatra/sinatra/pull/1500.diff","patch_url":"https://github.com/sinatra/sinatra/pull/1500.patch","issue_url":"https://api.github.com/repos/sinatra/sinatra/issues/1500","number":1500,"state":"open","locked":false,"title":"Update yield_content to append default to ERB template buffer","user":{"login":"jkowens","id":585943,"node_id":"MDQ6VXNlcjU4NTk0Mw==","avatar_url":"https://avatars2.githubusercontent.com/u/585943?v=4","gravatar_id":"","url":"https://api.github.com/users/jkowens","html_url":"https://github.com/jkowens","followers_url":"https://api.github.com/users/jkowens/followers","following_url":"https://api.github.com/users/jkowens/following{/other_user}","gists_url":"https://api.github.com/users/jkowens/gists{/gist_id}","starred_url":"https://api.github.com/users/jkowens/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jkowens/subscriptions","organizations_url":"https://api.github.com/users/jkowens/orgs","repos_url":"https://api.github.com/users/jkowens/repos","events_url":"https://api.github.com/users/jkowens/events{/privacy}","received_events_url":"https://api.github.com/users/jkowens/received_events","type":"User","site_admin":false},"body":"Resolves #1480. For ERB, using a block with an expression printing tag is invalid syntax. This PR allows `yield_content` to append directly to the template buffer using a non-printing tag.","created_at":"2018-11-30T18:52:50Z","updated_at":"2018-12-09T06:16:17Z","closed_at":null,"merged_at":null,"merge_commit_sha":"38c3f7f854eb20fcc859633585f2417a39c7f36a","assignee":null,"assignees":[],"requested_reviewers":[],"requested_teams":[],"labels":[],"milestone":null,"commits_url":"https://api.github.com/repos/sinatra/sinatra/pulls/1500/commits","review_comments_url":"https://api.github.com/repos/sinatra/sinatra/pulls/1500/comments","review_comment_url":"https://api.github.com/repos/sinatra/sinatra/pulls/comments{/number}","comments_url":"https://api.github.com/repos/sinatra/sinatra/issues/1500/comments","statuses_url":"https://api.github.com/repos/sinatra/sinatra/statuses/5643293b8fc6c8ed0838046aeb37145804f79239","head":{"label":"jkowens:fix-1480","ref":"fix-1480","sha":"5643293b8fc6c8ed0838046aeb37145804f79239","user":{"login":"jkowens","id":585943,"node_id":"MDQ6VXNlcjU4NTk0Mw==","avatar_url":"https://avatars2.githubusercontent.com/u/585943?v=4","gravatar_id":"","url":"https://api.github.com/users/jkowens","html_url":"https://github.com/jkowens","followers_url":"https://api.github.com/users/jkowens/followers","following_url":"https://api.github.com/users/jkowens/following{/other_user}","gists_url":"https://api.github.com/users/jkowens/gists{/gist_id}","starred_url":"https://api.github.com/users/jkowens/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jkowens/subscriptions","organizations_url":"https://api.github.com/users/jkowens/orgs","repos_url":"https://api.github.com/users/jkowens/repos","events_url":"https://api.github.com/users/jkowens/events{/privacy}","received_events_url":"https://api.github.com/users/jkowens/received_events","type":"User","site_admin":false},"repo":{"id":49968440,"node_id":"MDEwOlJlcG9zaXRvcnk0OTk2ODQ0MA==","name":"sinatra","full_name":"jkowens/sinatra","private":false,"owner":{"login":"jkowens","id":585943,"node_id":"MDQ6VXNlcjU4NTk0Mw==","avatar_url":"https://avatars2.githubusercontent.com/u/585943?v=4","gravatar_id":"","url":"https://api.github.com/users/jkowens","html_url":"https://github.com/jkowens","followers_url":"https://api.github.com/users/jkowens/followers","following_url":"https://api.github.com/users/jkowens/following{/other_user}","gists_url":"https://api.github.com/users/jkowens/gists{/gist_id}","starred_url":"https://api.github.com/users/jkowens/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jkowens/subscriptions","organizations_url":"https://api.github.com/users/jkowens/orgs","repos_url":"https://api.github.com/users/jkowens/repos","events_url":"https://api.github.com/users/jkowens/events{/privacy}","received_events_url":"https://api.github.com/users/jkowens/received_events","type":"User","site_admin":false},"html_url":"https://github.com/jkowens/sinatra","description":"Classy web-development dressed in a DSL (official / canonical repo)","fork":true,"url":"https://api.github.com/repos/jkowens/sinatra","forks_url":"https://api.github.com/repos/jkowens/sinatra/forks","keys_url":"https://api.github.com/repos/jkowens/sinatra/keys{/key_id}","collaborators_url":"https://api.github.com/repos/jkowens/sinatra/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/jkowens/sinatra/teams","hooks_url":"https://api.github.com/repos/jkowens/sinatra/hooks","issue_events_url":"https://api.github.com/repos/jkowens/sinatra/issues/events{/number}","events_url":"https://api.github.com/repos/jkowens/sinatra/events","assignees_url":"https://api.github.com/repos/jkowens/sinatra/assignees{/user}","branches_url":"https://api.github.com/repos/jkowens/sinatra/branches{/branch}","tags_url":"https://api.github.com/repos/jkowens/sinatra/tags","blobs_url":"https://api.github.com/repos/jkowens/sinatra/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/jkowens/sinatra/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/jkowens/sinatra/git/refs{/sha}","trees_url":"https://api.github.com/repos/jkowens/sinatra/git/trees{/sha}","statuses_url":"https://api.github.com/repos/jkowens/sinatra/statuses/{sha}","languages_url":"https://api.github.com/repos/jkowens/sinatra/languages","stargazers_url":"https://api.github.com/repos/jkowens/sinatra/stargazers","contributors_url":"https://api.github.com/repos/jkowens/sinatra/contributors","subscribers_url":"https://api.github.com/repos/jkowens/sinatra/subscribers","subscription_url":"https://api.github.com/repos/jkowens/sinatra/subscription","commits_url":"https://api.github.com/repos/jkowens/sinatra/commits{/sha}","git_commits_url":"https://api.github.com/repos/jkowens/sinatra/git/commits{/sha}","comments_url":"https://api.github.com/repos/jkowens/sinatra/comments{/number}","issue_comment_url":"https://api.github.com/repos/jkowens/sinatra/issues/comments{/number}","contents_url":"https://api.github.com/repos/jkowens/sinatra/contents/{+path}","compare_url":"https://api.github.com/repos/jkowens/sinatra/compare/{base}...{head}","merges_url":"https://api.github.com/repos/jkowens/sinatra/merges","archive_url":"https://api.github.com/repos/jkowens/sinatra/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/jkowens/sinatra/downloads","issues_url":"https://api.github.com/repos/jkowens/sinatra/issues{/number}","pulls_url":"https://api.github.com/repos/jkowens/sinatra/pulls{/number}","milestones_url":"https://api.github.com/repos/jkowens/sinatra/milestones{/number}","notifications_url":"https://api.github.com/repos/jkowens/sinatra/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/jkowens/sinatra/labels{/name}","releases_url":"https://api.github.com/repos/jkowens/sinatra/releases{/id}","deployments_url":"https://api.github.com/repos/jkowens/sinatra/deployments","created_at":"2016-01-19T17:03:56Z","updated_at":"2018-11-04T17:57:47Z","pushed_at":"2018-12-09T06:16:05Z","git_url":"git://github.com/jkowens/sinatra.git","ssh_url":"git@github.com:jkowens/sinatra.git","clone_url":"https://github.com/jkowens/sinatra.git","svn_url":"https://github.com/jkowens/sinatra","homepage":"http://www.sinatrarb.com/","size":6339,"stargazers_count":0,"watchers_count":0,"language":"Ruby","has_issues":false,"has_projects":true,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":0,"mirror_url":null,"archived":false,"open_issues_count":0,"license":{"key":"mit","name":"MIT License","spdx_id":"MIT","url":"https://api.github.com/licenses/mit","node_id":"MDc6TGljZW5zZTEz"},"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"sinatra:master","ref":"master","sha":"94bd005d933f8ac9394cbe04d331b0b51e93f7bf","user":{"login":"sinatra","id":8312,"node_id":"MDEyOk9yZ2FuaXphdGlvbjgzMTI=","avatar_url":"https://avatars0.githubusercontent.com/u/8312?v=4","gravatar_id":"","url":"https://api.github.com/users/sinatra","html_url":"https://github.com/sinatra","followers_url":"https://api.github.com/users/sinatra/followers","following_url":"https://api.github.com/users/sinatra/following{/other_user}","gists_url":"https://api.github.com/users/sinatra/gists{/gist_id}","starred_url":"https://api.github.com/users/sinatra/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/sinatra/subscriptions","organizations_url":"https://api.github.com/users/sinatra/orgs","repos_url":"https://api.github.com/users/sinatra/repos","events_url":"https://api.github.com/users/sinatra/events{/privacy}","received_events_url":"https://api.github.com/users/sinatra/received_events","type":"Organization","site_admin":false},"repo":{"id":106995,"node_id":"MDEwOlJlcG9zaXRvcnkxMDY5OTU=","name":"sinatra","full_name":"sinatra/sinatra","private":false,"owner":{"login":"sinatra","id":8312,"node_id":"MDEyOk9yZ2FuaXphdGlvbjgzMTI=","avatar_url":"https://avatars0.githubusercontent.com/u/8312?v=4","gravatar_id":"","url":"https://api.github.com/users/sinatra","html_url":"https://github.com/sinatra","followers_url":"https://api.github.com/users/sinatra/followers","following_url":"https://api.github.com/users/sinatra/following{/other_user}","gists_url":"https://api.github.com/users/sinatra/gists{/gist_id}","starred_url":"https://api.github.com/users/sinatra/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/sinatra/subscriptions","organizations_url":"https://api.github.com/users/sinatra/orgs","repos_url":"https://api.github.com/users/sinatra/repos","events_url":"https://api.github.com/users/sinatra/events{/privacy}","received_events_url":"https://api.github.com/users/sinatra/received_events","type":"Organization","site_admin":false},"html_url":"https://github.com/sinatra/sinatra","description":"Classy web-development dressed in a DSL (official / canonical repo)","fork":false,"url":"https://api.github.com/repos/sinatra/sinatra","forks_url":"https://api.github.com/repos/sinatra/sinatra/forks","keys_url":"https://api.github.com/repos/sinatra/sinatra/keys{/key_id}","collaborators_url":"https://api.github.com/repos/sinatra/sinatra/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/sinatra/sinatra/teams","hooks_url":"https://api.github.com/repos/sinatra/sinatra/hooks","issue_events_url":"https://api.github.com/repos/sinatra/sinatra/issues/events{/number}","events_url":"https://api.github.com/repos/sinatra/sinatra/events","assignees_url":"https://api.github.com/repos/sinatra/sinatra/assignees{/user}","branches_url":"https://api.github.com/repos/sinatra/sinatra/branches{/branch}","tags_url":"https://api.github.com/repos/sinatra/sinatra/tags","blobs_url":"https://api.github.com/repos/sinatra/sinatra/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/sinatra/sinatra/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/sinatra/sinatra/git/refs{/sha}","trees_url":"https://api.github.com/repos/sinatra/sinatra/git/trees{/sha}","statuses_url":"https://api.github.com/repos/sinatra/sinatra/statuses/{sha}","languages_url":"https://api.github.com/repos/sinatra/sinatra/languages","stargazers_url":"https://api.github.com/repos/sinatra/sinatra/stargazers","contributors_url":"https://api.github.com/repos/sinatra/sinatra/contributors","subscribers_url":"https://api.github.com/repos/sinatra/sinatra/subscribers","subscription_url":"https://api.github.com/repos/sinatra/sinatra/subscription","commits_url":"https://api.github.com/repos/sinatra/sinatra/commits{/sha}","git_commits_url":"https://api.github.com/repos/sinatra/sinatra/git/commits{/sha}","comments_url":"https://api.github.com/repos/sinatra/sinatra/comments{/number}","issue_comment_url":"https://api.github.com/repos/sinatra/sinatra/issues/comments{/number}","contents_url":"https://api.github.com/repos/sinatra/sinatra/contents/{+path}","compare_url":"https://api.github.com/repos/sinatra/sinatra/compare/{base}...{head}","merges_url":"https://api.github.com/repos/sinatra/sinatra/merges","archive_url":"https://api.github.com/repos/sinatra/sinatra/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/sinatra/sinatra/downloads","issues_url":"https://api.github.com/repos/sinatra/sinatra/issues{/number}","pulls_url":"https://api.github.com/repos/sinatra/sinatra/pulls{/number}","milestones_url":"https://api.github.com/repos/sinatra/sinatra/milestones{/number}","notifications_url":"https://api.github.com/repos/sinatra/sinatra/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/sinatra/sinatra/labels{/name}","releases_url":"https://api.github.com/repos/sinatra/sinatra/releases{/id}","deployments_url":"https://api.github.com/repos/sinatra/sinatra/deployments","created_at":"2009-01-14T01:27:30Z","updated_at":"2018-12-09T06:09:23Z","pushed_at":"2018-12-09T06:16:09Z","git_url":"git://github.com/sinatra/sinatra.git","ssh_url":"git@github.com:sinatra/sinatra.git","clone_url":"https://github.com/sinatra/sinatra.git","svn_url":"https://github.com/sinatra/sinatra","homepage":"http://www.sinatrarb.com/","size":6356,"stargazers_count":10309,"watchers_count":10309,"language":"Ruby","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":1838,"mirror_url":null,"archived":false,"open_issues_count":96,"license":{"key":"mit","name":"MIT License","spdx_id":"MIT","url":"https://api.github.com/licenses/mit","node_id":"MDc6TGljZW5zZTEz"},"forks":1838,"open_issues":96,"watchers":10309,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/sinatra/sinatra/pulls/1500"},"html":{"href":"https://github.com/sinatra/sinatra/pull/1500"},"issue":{"href":"https://api.github.com/repos/sinatra/sinatra/issues/1500"},"comments":{"href":"https://api.github.com/repos/sinatra/sinatra/issues/1500/comments"},"review_comments":{"href":"https://api.github.com/repos/sinatra/sinatra/pulls/1500/comments"},"review_comment":{"href":"https://api.github.com/repos/sinatra/sinatra/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/sinatra/sinatra/pulls/1500/commits"},"statuses":{"href":"https://api.github.com/repos/sinatra/sinatra/statuses/5643293b8fc6c8ed0838046aeb37145804f79239"}},"author_association":"MEMBER"}}
{"actor":{"display_login":"namusyaka"}}