{"action":"opened","number":2702,"pull_request":{"url":"https://api.github.com/repos/mruby/mruby/pulls/2702","id":27288905,"html_url":"https://github.com/mruby/mruby/pull/2702","diff_url":"https://github.com/mruby/mruby/pull/2702.diff","patch_url":"https://github.com/mruby/mruby/pull/2702.patch","issue_url":"https://api.github.com/repos/mruby/mruby/issues/2702","number":2702,"state":"open","locked":false,"title":"fix infinite loop in String#match(arg) when arg is String","user":{"login":"takahashim","id":10401,"avatar_url":"https://avatars.githubusercontent.com/u/10401?v=3","gravatar_id":"","url":"https://api.github.com/users/takahashim","html_url":"https://github.com/takahashim","followers_url":"https://api.github.com/users/takahashim/followers","following_url":"https://api.github.com/users/takahashim/following{/other_user}","gists_url":"https://api.github.com/users/takahashim/gists{/gist_id}","starred_url":"https://api.github.com/users/takahashim/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/takahashim/subscriptions","organizations_url":"https://api.github.com/users/takahashim/orgs","repos_url":"https://api.github.com/users/takahashim/repos","events_url":"https://api.github.com/users/takahashim/events{/privacy}","received_events_url":"https://api.github.com/users/takahashim/received_events","type":"User","site_admin":false},"body":"Before:\r\n\r\n```\r\n$ ./bin/mirb \r\nmirb - Embeddable Interactive Ruby Shell\r\n\r\n> \"abc\".match(\"b\")\r\n/Users/maki/tmp/mruby/mrblib/string.rb:149: stack level too deep. (limit=(0x40000 - 128)) (SystemStackError)\r\n```\r\n\r\nAfter (with `conf.gem github: 'iij/mruby-regexp-pcre'`):\r\n\r\n```\r\n$ ./bin/mirb \r\nmirb - Embeddable Interactive Ruby Shell\r\n\r\n> \"abc\".match(\"b\")\r\n => #<MatchData \"b\">\r\n```\r\n\r\nAfter (without any regexp gems):\r\n\r\n```\r\n$ ./bin/mirb \r\nmirb - Embeddable Interactive Ruby Shell\r\n\r\n> \"abc\".match(\"b\")\r\n/Users/maki/tmp/mruby/mrblib/string.rb:154: String#match needs Regexp class (NotImplementedError)\r\n```\r\n\r\ncf. ISO (draft) 15.2.10.5.27 (and JIS X 03071:2011):\r\n \r\n> if *regexp* (argument of `String#match`) is an instance of the class `String`, create a direct instance of\r\n> the class `Regexp` by invoking the method `new` on the class `Regexp` with *regexp* as the\r\n> argument.\r\n","created_at":"2015-01-13T17:32:50Z","updated_at":"2015-01-13T17:32:50Z","closed_at":null,"merged_at":null,"merge_commit_sha":null,"assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/mruby/mruby/pulls/2702/commits","review_comments_url":"https://api.github.com/repos/mruby/mruby/pulls/2702/comments","review_comment_url":"https://api.github.com/repos/mruby/mruby/pulls/comments/{number}","comments_url":"https://api.github.com/repos/mruby/mruby/issues/2702/comments","statuses_url":"https://api.github.com/repos/mruby/mruby/statuses/bcceeba09b38eb8217f85aa5c11afac9eb9b888e","head":{"label":"takahashim:fix-string-match","ref":"fix-string-match","sha":"bcceeba09b38eb8217f85aa5c11afac9eb9b888e","user":{"login":"takahashim","id":10401,"avatar_url":"https://avatars.githubusercontent.com/u/10401?v=3","gravatar_id":"","url":"https://api.github.com/users/takahashim","html_url":"https://github.com/takahashim","followers_url":"https://api.github.com/users/takahashim/followers","following_url":"https://api.github.com/users/takahashim/following{/other_user}","gists_url":"https://api.github.com/users/takahashim/gists{/gist_id}","starred_url":"https://api.github.com/users/takahashim/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/takahashim/subscriptions","organizations_url":"https://api.github.com/users/takahashim/orgs","repos_url":"https://api.github.com/users/takahashim/repos","events_url":"https://api.github.com/users/takahashim/events{/privacy}","received_events_url":"https://api.github.com/users/takahashim/received_events","type":"User","site_admin":false},"repo":{"id":4087903,"name":"mruby","full_name":"takahashim/mruby","owner":{"login":"takahashim","id":10401,"avatar_url":"https://avatars.githubusercontent.com/u/10401?v=3","gravatar_id":"","url":"https://api.github.com/users/takahashim","html_url":"https://github.com/takahashim","followers_url":"https://api.github.com/users/takahashim/followers","following_url":"https://api.github.com/users/takahashim/following{/other_user}","gists_url":"https://api.github.com/users/takahashim/gists{/gist_id}","starred_url":"https://api.github.com/users/takahashim/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/takahashim/subscriptions","organizations_url":"https://api.github.com/users/takahashim/orgs","repos_url":"https://api.github.com/users/takahashim/repos","events_url":"https://api.github.com/users/takahashim/events{/privacy}","received_events_url":"https://api.github.com/users/takahashim/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/takahashim/mruby","description":"Lightweight Ruby","fork":true,"url":"https://api.github.com/repos/takahashim/mruby","forks_url":"https://api.github.com/repos/takahashim/mruby/forks","keys_url":"https://api.github.com/repos/takahashim/mruby/keys{/key_id}","collaborators_url":"https://api.github.com/repos/takahashim/mruby/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/takahashim/mruby/teams","hooks_url":"https://api.github.com/repos/takahashim/mruby/hooks","issue_events_url":"https://api.github.com/repos/takahashim/mruby/issues/events{/number}","events_url":"https://api.github.com/repos/takahashim/mruby/events","assignees_url":"https://api.github.com/repos/takahashim/mruby/assignees{/user}","branches_url":"https://api.github.com/repos/takahashim/mruby/branches{/branch}","tags_url":"https://api.github.com/repos/takahashim/mruby/tags","blobs_url":"https://api.github.com/repos/takahashim/mruby/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/takahashim/mruby/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/takahashim/mruby/git/refs{/sha}","trees_url":"https://api.github.com/repos/takahashim/mruby/git/trees{/sha}","statuses_url":"https://api.github.com/repos/takahashim/mruby/statuses/{sha}","languages_url":"https://api.github.com/repos/takahashim/mruby/languages","stargazers_url":"https://api.github.com/repos/takahashim/mruby/stargazers","contributors_url":"https://api.github.com/repos/takahashim/mruby/contributors","subscribers_url":"https://api.github.com/repos/takahashim/mruby/subscribers","subscription_url":"https://api.github.com/repos/takahashim/mruby/subscription","commits_url":"https://api.github.com/repos/takahashim/mruby/commits{/sha}","git_commits_url":"https://api.github.com/repos/takahashim/mruby/git/commits{/sha}","comments_url":"https://api.github.com/repos/takahashim/mruby/comments{/number}","issue_comment_url":"https://api.github.com/repos/takahashim/mruby/issues/comments/{number}","contents_url":"https://api.github.com/repos/takahashim/mruby/contents/{+path}","compare_url":"https://api.github.com/repos/takahashim/mruby/compare/{base}...{head}","merges_url":"https://api.github.com/repos/takahashim/mruby/merges","archive_url":"https://api.github.com/repos/takahashim/mruby/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/takahashim/mruby/downloads","issues_url":"https://api.github.com/repos/takahashim/mruby/issues{/number}","pulls_url":"https://api.github.com/repos/takahashim/mruby/pulls{/number}","milestones_url":"https://api.github.com/repos/takahashim/mruby/milestones{/number}","notifications_url":"https://api.github.com/repos/takahashim/mruby/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/takahashim/mruby/labels{/name}","releases_url":"https://api.github.com/repos/takahashim/mruby/releases{/id}","created_at":"2012-04-20T15:16:01Z","updated_at":"2014-12-10T16:44:19Z","pushed_at":"2015-01-13T17:18:09Z","git_url":"git://github.com/takahashim/mruby.git","ssh_url":"git@github.com:takahashim/mruby.git","clone_url":"https://github.com/takahashim/mruby.git","svn_url":"https://github.com/takahashim/mruby","homepage":null,"size":6034,"stargazers_count":0,"watchers_count":0,"language":"C","has_issues":false,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":0,"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"mruby:master","ref":"master","sha":"d405eb554181910baf8bafa8bbdc7db55feb182c","user":{"login":"mruby","id":1796512,"avatar_url":"https://avatars.githubusercontent.com/u/1796512?v=3","gravatar_id":"","url":"https://api.github.com/users/mruby","html_url":"https://github.com/mruby","followers_url":"https://api.github.com/users/mruby/followers","following_url":"https://api.github.com/users/mruby/following{/other_user}","gists_url":"https://api.github.com/users/mruby/gists{/gist_id}","starred_url":"https://api.github.com/users/mruby/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mruby/subscriptions","organizations_url":"https://api.github.com/users/mruby/orgs","repos_url":"https://api.github.com/users/mruby/repos","events_url":"https://api.github.com/users/mruby/events{/privacy}","received_events_url":"https://api.github.com/users/mruby/received_events","type":"Organization","site_admin":false},"repo":{"id":4073516,"name":"mruby","full_name":"mruby/mruby","owner":{"login":"mruby","id":1796512,"avatar_url":"https://avatars.githubusercontent.com/u/1796512?v=3","gravatar_id":"","url":"https://api.github.com/users/mruby","html_url":"https://github.com/mruby","followers_url":"https://api.github.com/users/mruby/followers","following_url":"https://api.github.com/users/mruby/following{/other_user}","gists_url":"https://api.github.com/users/mruby/gists{/gist_id}","starred_url":"https://api.github.com/users/mruby/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mruby/subscriptions","organizations_url":"https://api.github.com/users/mruby/orgs","repos_url":"https://api.github.com/users/mruby/repos","events_url":"https://api.github.com/users/mruby/events{/privacy}","received_events_url":"https://api.github.com/users/mruby/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/mruby/mruby","description":"Lightweight Ruby","fork":false,"url":"https://api.github.com/repos/mruby/mruby","forks_url":"https://api.github.com/repos/mruby/mruby/forks","keys_url":"https://api.github.com/repos/mruby/mruby/keys{/key_id}","collaborators_url":"https://api.github.com/repos/mruby/mruby/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/mruby/mruby/teams","hooks_url":"https://api.github.com/repos/mruby/mruby/hooks","issue_events_url":"https://api.github.com/repos/mruby/mruby/issues/events{/number}","events_url":"https://api.github.com/repos/mruby/mruby/events","assignees_url":"https://api.github.com/repos/mruby/mruby/assignees{/user}","branches_url":"https://api.github.com/repos/mruby/mruby/branches{/branch}","tags_url":"https://api.github.com/repos/mruby/mruby/tags","blobs_url":"https://api.github.com/repos/mruby/mruby/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/mruby/mruby/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/mruby/mruby/git/refs{/sha}","trees_url":"https://api.github.com/repos/mruby/mruby/git/trees{/sha}","statuses_url":"https://api.github.com/repos/mruby/mruby/statuses/{sha}","languages_url":"https://api.github.com/repos/mruby/mruby/languages","stargazers_url":"https://api.github.com/repos/mruby/mruby/stargazers","contributors_url":"https://api.github.com/repos/mruby/mruby/contributors","subscribers_url":"https://api.github.com/repos/mruby/mruby/subscribers","subscription_url":"https://api.github.com/repos/mruby/mruby/subscription","commits_url":"https://api.github.com/repos/mruby/mruby/commits{/sha}","git_commits_url":"https://api.github.com/repos/mruby/mruby/git/commits{/sha}","comments_url":"https://api.github.com/repos/mruby/mruby/comments{/number}","issue_comment_url":"https://api.github.com/repos/mruby/mruby/issues/comments/{number}","contents_url":"https://api.github.com/repos/mruby/mruby/contents/{+path}","compare_url":"https://api.github.com/repos/mruby/mruby/compare/{base}...{head}","merges_url":"https://api.github.com/repos/mruby/mruby/merges","archive_url":"https://api.github.com/repos/mruby/mruby/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/mruby/mruby/downloads","issues_url":"https://api.github.com/repos/mruby/mruby/issues{/number}","pulls_url":"https://api.github.com/repos/mruby/mruby/pulls{/number}","milestones_url":"https://api.github.com/repos/mruby/mruby/milestones{/number}","notifications_url":"https://api.github.com/repos/mruby/mruby/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/mruby/mruby/labels{/name}","releases_url":"https://api.github.com/repos/mruby/mruby/releases{/id}","created_at":"2012-04-19T09:11:15Z","updated_at":"2015-01-13T11:27:19Z","pushed_at":"2015-01-13T11:27:19Z","git_url":"git://github.com/mruby/mruby.git","ssh_url":"git@github.com:mruby/mruby.git","clone_url":"https://github.com/mruby/mruby.git","svn_url":"https://github.com/mruby/mruby","homepage":null,"size":20032,"stargazers_count":2926,"watchers_count":2926,"language":"C","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":439,"mirror_url":null,"open_issues_count":122,"forks":439,"open_issues":122,"watchers":2926,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/mruby/mruby/pulls/2702"},"html":{"href":"https://github.com/mruby/mruby/pull/2702"},"issue":{"href":"https://api.github.com/repos/mruby/mruby/issues/2702"},"comments":{"href":"https://api.github.com/repos/mruby/mruby/issues/2702/comments"},"review_comments":{"href":"https://api.github.com/repos/mruby/mruby/pulls/2702/comments"},"review_comment":{"href":"https://api.github.com/repos/mruby/mruby/pulls/comments/{number}"},"commits":{"href":"https://api.github.com/repos/mruby/mruby/pulls/2702/commits"},"statuses":{"href":"https://api.github.com/repos/mruby/mruby/statuses/bcceeba09b38eb8217f85aa5c11afac9eb9b888e"}},"merged":false,"mergeable":null,"mergeable_state":"unknown","merged_by":null,"comments":0,"review_comments":0,"commits":1,"additions":10,"deletions":1,"changed_files":1}}