{"action":"opened","number":605,"pull_request":{"url":"https://api.github.com/repos/RubyMoney/money/pulls/605","id":56897951,"html_url":"https://github.com/RubyMoney/money/pull/605","diff_url":"https://github.com/RubyMoney/money/pull/605.diff","patch_url":"https://github.com/RubyMoney/money/pull/605.patch","issue_url":"https://api.github.com/repos/RubyMoney/money/issues/605","number":605,"state":"open","locked":false,"title":"Fix commutative property issue","user":{"login":"evheny0","id":3540194,"avatar_url":"https://avatars.githubusercontent.com/u/3540194?v=3","gravatar_id":"","url":"https://api.github.com/users/evheny0","html_url":"https://github.com/evheny0","followers_url":"https://api.github.com/users/evheny0/followers","following_url":"https://api.github.com/users/evheny0/following{/other_user}","gists_url":"https://api.github.com/users/evheny0/gists{/gist_id}","starred_url":"https://api.github.com/users/evheny0/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/evheny0/subscriptions","organizations_url":"https://api.github.com/users/evheny0/orgs","repos_url":"https://api.github.com/users/evheny0/repos","events_url":"https://api.github.com/users/evheny0/events{/privacy}","received_events_url":"https://api.github.com/users/evheny0/received_events","type":"User","site_admin":false},"body":"## Was\r\n\r\n```ruby\r\nMoney.new(1, 'USD') - 0   # <Money fractional:1 currency:USD>\r\n0 - Money.new(1, 'USD')   # TypeError: TypeError\r\n\r\nMoney.new(1, 'USD') + 0   # <Money fractional:1 currency:USD>\r\n0 + Money.new(1, 'USD')   # TypeError: TypeError\r\n\r\nMoney.new(1, 'USD') <=> 0   # nil\r\n0 <=> Money.new(1, 'USD')   # TypeError: TypeError\r\n```\r\n## Now\r\n\r\n```ruby\r\nMoney.new(1, 'USD') - 0   # <Money fractional:1 currency:USD>\r\n0 - Money.new(1, 'USD')   # <Money fractional:-1 currency:USD>\r\n\r\nMoney.new(1, 'USD') + 0   # <Money fractional:1 currency:USD>\r\n0 + Money.new(1, 'USD')   # <Money fractional:1 currency:USD>\r\n\r\nMoney.new(1, 'USD') <=> 0   # nil\r\n0 <=> Money.new(1, 'USD')   # nil\r\n```","created_at":"2016-01-22T15:02:41Z","updated_at":"2016-01-22T15:02:41Z","closed_at":null,"merged_at":null,"merge_commit_sha":null,"assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/RubyMoney/money/pulls/605/commits","review_comments_url":"https://api.github.com/repos/RubyMoney/money/pulls/605/comments","review_comment_url":"https://api.github.com/repos/RubyMoney/money/pulls/comments{/number}","comments_url":"https://api.github.com/repos/RubyMoney/money/issues/605/comments","statuses_url":"https://api.github.com/repos/RubyMoney/money/statuses/53310ec03de9c70874b4697ab5f74a211841ccbc","head":{"label":"rubyroidlabs:master","ref":"master","sha":"53310ec03de9c70874b4697ab5f74a211841ccbc","user":{"login":"rubyroidlabs","id":5137565,"avatar_url":"https://avatars.githubusercontent.com/u/5137565?v=3","gravatar_id":"","url":"https://api.github.com/users/rubyroidlabs","html_url":"https://github.com/rubyroidlabs","followers_url":"https://api.github.com/users/rubyroidlabs/followers","following_url":"https://api.github.com/users/rubyroidlabs/following{/other_user}","gists_url":"https://api.github.com/users/rubyroidlabs/gists{/gist_id}","starred_url":"https://api.github.com/users/rubyroidlabs/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rubyroidlabs/subscriptions","organizations_url":"https://api.github.com/users/rubyroidlabs/orgs","repos_url":"https://api.github.com/users/rubyroidlabs/repos","events_url":"https://api.github.com/users/rubyroidlabs/events{/privacy}","received_events_url":"https://api.github.com/users/rubyroidlabs/received_events","type":"Organization","site_admin":false},"repo":{"id":50180545,"name":"money","full_name":"rubyroidlabs/money","owner":{"login":"rubyroidlabs","id":5137565,"avatar_url":"https://avatars.githubusercontent.com/u/5137565?v=3","gravatar_id":"","url":"https://api.github.com/users/rubyroidlabs","html_url":"https://github.com/rubyroidlabs","followers_url":"https://api.github.com/users/rubyroidlabs/followers","following_url":"https://api.github.com/users/rubyroidlabs/following{/other_user}","gists_url":"https://api.github.com/users/rubyroidlabs/gists{/gist_id}","starred_url":"https://api.github.com/users/rubyroidlabs/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rubyroidlabs/subscriptions","organizations_url":"https://api.github.com/users/rubyroidlabs/orgs","repos_url":"https://api.github.com/users/rubyroidlabs/repos","events_url":"https://api.github.com/users/rubyroidlabs/events{/privacy}","received_events_url":"https://api.github.com/users/rubyroidlabs/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/rubyroidlabs/money","description":"A Ruby Library for dealing with money and currency conversion.","fork":true,"url":"https://api.github.com/repos/rubyroidlabs/money","forks_url":"https://api.github.com/repos/rubyroidlabs/money/forks","keys_url":"https://api.github.com/repos/rubyroidlabs/money/keys{/key_id}","collaborators_url":"https://api.github.com/repos/rubyroidlabs/money/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/rubyroidlabs/money/teams","hooks_url":"https://api.github.com/repos/rubyroidlabs/money/hooks","issue_events_url":"https://api.github.com/repos/rubyroidlabs/money/issues/events{/number}","events_url":"https://api.github.com/repos/rubyroidlabs/money/events","assignees_url":"https://api.github.com/repos/rubyroidlabs/money/assignees{/user}","branches_url":"https://api.github.com/repos/rubyroidlabs/money/branches{/branch}","tags_url":"https://api.github.com/repos/rubyroidlabs/money/tags","blobs_url":"https://api.github.com/repos/rubyroidlabs/money/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/rubyroidlabs/money/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/rubyroidlabs/money/git/refs{/sha}","trees_url":"https://api.github.com/repos/rubyroidlabs/money/git/trees{/sha}","statuses_url":"https://api.github.com/repos/rubyroidlabs/money/statuses/{sha}","languages_url":"https://api.github.com/repos/rubyroidlabs/money/languages","stargazers_url":"https://api.github.com/repos/rubyroidlabs/money/stargazers","contributors_url":"https://api.github.com/repos/rubyroidlabs/money/contributors","subscribers_url":"https://api.github.com/repos/rubyroidlabs/money/subscribers","subscription_url":"https://api.github.com/repos/rubyroidlabs/money/subscription","commits_url":"https://api.github.com/repos/rubyroidlabs/money/commits{/sha}","git_commits_url":"https://api.github.com/repos/rubyroidlabs/money/git/commits{/sha}","comments_url":"https://api.github.com/repos/rubyroidlabs/money/comments{/number}","issue_comment_url":"https://api.github.com/repos/rubyroidlabs/money/issues/comments{/number}","contents_url":"https://api.github.com/repos/rubyroidlabs/money/contents/{+path}","compare_url":"https://api.github.com/repos/rubyroidlabs/money/compare/{base}...{head}","merges_url":"https://api.github.com/repos/rubyroidlabs/money/merges","archive_url":"https://api.github.com/repos/rubyroidlabs/money/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/rubyroidlabs/money/downloads","issues_url":"https://api.github.com/repos/rubyroidlabs/money/issues{/number}","pulls_url":"https://api.github.com/repos/rubyroidlabs/money/pulls{/number}","milestones_url":"https://api.github.com/repos/rubyroidlabs/money/milestones{/number}","notifications_url":"https://api.github.com/repos/rubyroidlabs/money/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/rubyroidlabs/money/labels{/name}","releases_url":"https://api.github.com/repos/rubyroidlabs/money/releases{/id}","deployments_url":"https://api.github.com/repos/rubyroidlabs/money/deployments","created_at":"2016-01-22T12:40:30Z","updated_at":"2016-01-22T12:40:31Z","pushed_at":"2016-01-22T14:53:50Z","git_url":"git://github.com/rubyroidlabs/money.git","ssh_url":"git@github.com:rubyroidlabs/money.git","clone_url":"https://github.com/rubyroidlabs/money.git","svn_url":"https://github.com/rubyroidlabs/money","homepage":"http://rubymoney.github.io/money","size":2125,"stargazers_count":0,"watchers_count":0,"language":"Ruby","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":"RubyMoney:master","ref":"master","sha":"a6cf21892b7c2a63fd6bfa714546a3c1903129f9","user":{"login":"RubyMoney","id":351550,"avatar_url":"https://avatars.githubusercontent.com/u/351550?v=3","gravatar_id":"","url":"https://api.github.com/users/RubyMoney","html_url":"https://github.com/RubyMoney","followers_url":"https://api.github.com/users/RubyMoney/followers","following_url":"https://api.github.com/users/RubyMoney/following{/other_user}","gists_url":"https://api.github.com/users/RubyMoney/gists{/gist_id}","starred_url":"https://api.github.com/users/RubyMoney/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/RubyMoney/subscriptions","organizations_url":"https://api.github.com/users/RubyMoney/orgs","repos_url":"https://api.github.com/users/RubyMoney/repos","events_url":"https://api.github.com/users/RubyMoney/events{/privacy}","received_events_url":"https://api.github.com/users/RubyMoney/received_events","type":"Organization","site_admin":false},"repo":{"id":70121,"name":"money","full_name":"RubyMoney/money","owner":{"login":"RubyMoney","id":351550,"avatar_url":"https://avatars.githubusercontent.com/u/351550?v=3","gravatar_id":"","url":"https://api.github.com/users/RubyMoney","html_url":"https://github.com/RubyMoney","followers_url":"https://api.github.com/users/RubyMoney/followers","following_url":"https://api.github.com/users/RubyMoney/following{/other_user}","gists_url":"https://api.github.com/users/RubyMoney/gists{/gist_id}","starred_url":"https://api.github.com/users/RubyMoney/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/RubyMoney/subscriptions","organizations_url":"https://api.github.com/users/RubyMoney/orgs","repos_url":"https://api.github.com/users/RubyMoney/repos","events_url":"https://api.github.com/users/RubyMoney/events{/privacy}","received_events_url":"https://api.github.com/users/RubyMoney/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/RubyMoney/money","description":"A Ruby Library for dealing with money and currency conversion.","fork":false,"url":"https://api.github.com/repos/RubyMoney/money","forks_url":"https://api.github.com/repos/RubyMoney/money/forks","keys_url":"https://api.github.com/repos/RubyMoney/money/keys{/key_id}","collaborators_url":"https://api.github.com/repos/RubyMoney/money/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/RubyMoney/money/teams","hooks_url":"https://api.github.com/repos/RubyMoney/money/hooks","issue_events_url":"https://api.github.com/repos/RubyMoney/money/issues/events{/number}","events_url":"https://api.github.com/repos/RubyMoney/money/events","assignees_url":"https://api.github.com/repos/RubyMoney/money/assignees{/user}","branches_url":"https://api.github.com/repos/RubyMoney/money/branches{/branch}","tags_url":"https://api.github.com/repos/RubyMoney/money/tags","blobs_url":"https://api.github.com/repos/RubyMoney/money/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/RubyMoney/money/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/RubyMoney/money/git/refs{/sha}","trees_url":"https://api.github.com/repos/RubyMoney/money/git/trees{/sha}","statuses_url":"https://api.github.com/repos/RubyMoney/money/statuses/{sha}","languages_url":"https://api.github.com/repos/RubyMoney/money/languages","stargazers_url":"https://api.github.com/repos/RubyMoney/money/stargazers","contributors_url":"https://api.github.com/repos/RubyMoney/money/contributors","subscribers_url":"https://api.github.com/repos/RubyMoney/money/subscribers","subscription_url":"https://api.github.com/repos/RubyMoney/money/subscription","commits_url":"https://api.github.com/repos/RubyMoney/money/commits{/sha}","git_commits_url":"https://api.github.com/repos/RubyMoney/money/git/commits{/sha}","comments_url":"https://api.github.com/repos/RubyMoney/money/comments{/number}","issue_comment_url":"https://api.github.com/repos/RubyMoney/money/issues/comments{/number}","contents_url":"https://api.github.com/repos/RubyMoney/money/contents/{+path}","compare_url":"https://api.github.com/repos/RubyMoney/money/compare/{base}...{head}","merges_url":"https://api.github.com/repos/RubyMoney/money/merges","archive_url":"https://api.github.com/repos/RubyMoney/money/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/RubyMoney/money/downloads","issues_url":"https://api.github.com/repos/RubyMoney/money/issues{/number}","pulls_url":"https://api.github.com/repos/RubyMoney/money/pulls{/number}","milestones_url":"https://api.github.com/repos/RubyMoney/money/milestones{/number}","notifications_url":"https://api.github.com/repos/RubyMoney/money/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/RubyMoney/money/labels{/name}","releases_url":"https://api.github.com/repos/RubyMoney/money/releases{/id}","deployments_url":"https://api.github.com/repos/RubyMoney/money/deployments","created_at":"2008-10-31T15:05:03Z","updated_at":"2016-01-19T11:29:38Z","pushed_at":"2016-01-20T13:15:44Z","git_url":"git://github.com/RubyMoney/money.git","ssh_url":"git@github.com:RubyMoney/money.git","clone_url":"https://github.com/RubyMoney/money.git","svn_url":"https://github.com/RubyMoney/money","homepage":"http://rubymoney.github.io/money","size":2498,"stargazers_count":1453,"watchers_count":1453,"language":"Ruby","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":true,"forks_count":347,"mirror_url":null,"open_issues_count":3,"forks":347,"open_issues":3,"watchers":1453,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/RubyMoney/money/pulls/605"},"html":{"href":"https://github.com/RubyMoney/money/pull/605"},"issue":{"href":"https://api.github.com/repos/RubyMoney/money/issues/605"},"comments":{"href":"https://api.github.com/repos/RubyMoney/money/issues/605/comments"},"review_comments":{"href":"https://api.github.com/repos/RubyMoney/money/pulls/605/comments"},"review_comment":{"href":"https://api.github.com/repos/RubyMoney/money/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/RubyMoney/money/pulls/605/commits"},"statuses":{"href":"https://api.github.com/repos/RubyMoney/money/statuses/53310ec03de9c70874b4697ab5f74a211841ccbc"}},"merged":false,"mergeable":null,"mergeable_state":"unknown","merged_by":null,"comments":0,"review_comments":0,"commits":1,"additions":18,"deletions":10,"changed_files":2}}