{"action":"closed","number":34135,"pull_request":{"url":"https://api.github.com/repos/rails/rails/pulls/34135","id":221528467,"node_id":"MDExOlB1bGxSZXF1ZXN0MjIxNTI4NDY3","html_url":"https://github.com/rails/rails/pull/34135","diff_url":"https://github.com/rails/rails/pull/34135.diff","patch_url":"https://github.com/rails/rails/pull/34135.patch","issue_url":"https://api.github.com/repos/rails/rails/issues/34135","number":34135,"state":"closed","locked":false,"title":"Fix issue where duration where always rounded up to a second:","user":{"login":"Edouard-chin","id":8122246,"node_id":"MDQ6VXNlcjgxMjIyNDY=","avatar_url":"https://avatars0.githubusercontent.com/u/8122246?v=4","gravatar_id":"","url":"https://api.github.com/users/Edouard-chin","html_url":"https://github.com/Edouard-chin","followers_url":"https://api.github.com/users/Edouard-chin/followers","following_url":"https://api.github.com/users/Edouard-chin/following{/other_user}","gists_url":"https://api.github.com/users/Edouard-chin/gists{/gist_id}","starred_url":"https://api.github.com/users/Edouard-chin/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Edouard-chin/subscriptions","organizations_url":"https://api.github.com/users/Edouard-chin/orgs","repos_url":"https://api.github.com/users/Edouard-chin/repos","events_url":"https://api.github.com/users/Edouard-chin/events{/privacy}","received_events_url":"https://api.github.com/users/Edouard-chin/received_events","type":"User","site_admin":false},"body":"- Adding a Float as a duration to a datetime would result in the Float\r\n  being rounded. Doing something like would have no effect because the\r\n  0.45 seconds would be rounded to 0 second.\r\n\r\n  ```ruby\r\n    time = DateTime.parse(\"2018-1-1\")\r\n    time += 0.45.seconds\r\n  ```\r\n\r\n  This behavior was intentionally added a very long time ago, the\r\n  reason was because Ruby 1.8 was using `Integer#gcd` in the\r\n  constructor of Rational which didn't accept a float value.\r\n\r\n  That's no longer the case and doing `Rational(0.45, 86400)` would\r\n  now perfectly work fine.\r\n\r\n- Fixes #34008\r\n\r\ncc/ @pixeltrix ","created_at":"2018-10-09T17:48:31Z","updated_at":"2018-10-15T08:53:14Z","closed_at":"2018-10-15T08:53:14Z","merged_at":"2018-10-15T08:53:13Z","merge_commit_sha":"777cc1da7d3ecca3f669976b47310f362e2bc8a4","assignee":{"login":"pixeltrix","id":6321,"node_id":"MDQ6VXNlcjYzMjE=","avatar_url":"https://avatars0.githubusercontent.com/u/6321?v=4","gravatar_id":"","url":"https://api.github.com/users/pixeltrix","html_url":"https://github.com/pixeltrix","followers_url":"https://api.github.com/users/pixeltrix/followers","following_url":"https://api.github.com/users/pixeltrix/following{/other_user}","gists_url":"https://api.github.com/users/pixeltrix/gists{/gist_id}","starred_url":"https://api.github.com/users/pixeltrix/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/pixeltrix/subscriptions","organizations_url":"https://api.github.com/users/pixeltrix/orgs","repos_url":"https://api.github.com/users/pixeltrix/repos","events_url":"https://api.github.com/users/pixeltrix/events{/privacy}","received_events_url":"https://api.github.com/users/pixeltrix/received_events","type":"User","site_admin":false},"assignees":[{"login":"pixeltrix","id":6321,"node_id":"MDQ6VXNlcjYzMjE=","avatar_url":"https://avatars0.githubusercontent.com/u/6321?v=4","gravatar_id":"","url":"https://api.github.com/users/pixeltrix","html_url":"https://github.com/pixeltrix","followers_url":"https://api.github.com/users/pixeltrix/followers","following_url":"https://api.github.com/users/pixeltrix/following{/other_user}","gists_url":"https://api.github.com/users/pixeltrix/gists{/gist_id}","starred_url":"https://api.github.com/users/pixeltrix/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/pixeltrix/subscriptions","organizations_url":"https://api.github.com/users/pixeltrix/orgs","repos_url":"https://api.github.com/users/pixeltrix/repos","events_url":"https://api.github.com/users/pixeltrix/events{/privacy}","received_events_url":"https://api.github.com/users/pixeltrix/received_events","type":"User","site_admin":false}],"requested_reviewers":[],"requested_teams":[],"labels":[{"id":107194,"node_id":"MDU6TGFiZWwxMDcxOTQ=","url":"https://api.github.com/repos/rails/rails/labels/activesupport","name":"activesupport","color":"FC9300","default":false}],"milestone":null,"commits_url":"https://api.github.com/repos/rails/rails/pulls/34135/commits","review_comments_url":"https://api.github.com/repos/rails/rails/pulls/34135/comments","review_comment_url":"https://api.github.com/repos/rails/rails/pulls/comments{/number}","comments_url":"https://api.github.com/repos/rails/rails/issues/34135/comments","statuses_url":"https://api.github.com/repos/rails/rails/statuses/c85e3f65f3409fc329732912908c3601d8e5fac9","head":{"label":"Edouard-chin:ec-rounded-duration","ref":"ec-rounded-duration","sha":"c85e3f65f3409fc329732912908c3601d8e5fac9","user":{"login":"Edouard-chin","id":8122246,"node_id":"MDQ6VXNlcjgxMjIyNDY=","avatar_url":"https://avatars0.githubusercontent.com/u/8122246?v=4","gravatar_id":"","url":"https://api.github.com/users/Edouard-chin","html_url":"https://github.com/Edouard-chin","followers_url":"https://api.github.com/users/Edouard-chin/followers","following_url":"https://api.github.com/users/Edouard-chin/following{/other_user}","gists_url":"https://api.github.com/users/Edouard-chin/gists{/gist_id}","starred_url":"https://api.github.com/users/Edouard-chin/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Edouard-chin/subscriptions","organizations_url":"https://api.github.com/users/Edouard-chin/orgs","repos_url":"https://api.github.com/users/Edouard-chin/repos","events_url":"https://api.github.com/users/Edouard-chin/events{/privacy}","received_events_url":"https://api.github.com/users/Edouard-chin/received_events","type":"User","site_admin":false},"repo":{"id":49133917,"node_id":"MDEwOlJlcG9zaXRvcnk0OTEzMzkxNw==","name":"rails","full_name":"Edouard-chin/rails","private":false,"owner":{"login":"Edouard-chin","id":8122246,"node_id":"MDQ6VXNlcjgxMjIyNDY=","avatar_url":"https://avatars0.githubusercontent.com/u/8122246?v=4","gravatar_id":"","url":"https://api.github.com/users/Edouard-chin","html_url":"https://github.com/Edouard-chin","followers_url":"https://api.github.com/users/Edouard-chin/followers","following_url":"https://api.github.com/users/Edouard-chin/following{/other_user}","gists_url":"https://api.github.com/users/Edouard-chin/gists{/gist_id}","starred_url":"https://api.github.com/users/Edouard-chin/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Edouard-chin/subscriptions","organizations_url":"https://api.github.com/users/Edouard-chin/orgs","repos_url":"https://api.github.com/users/Edouard-chin/repos","events_url":"https://api.github.com/users/Edouard-chin/events{/privacy}","received_events_url":"https://api.github.com/users/Edouard-chin/received_events","type":"User","site_admin":false},"html_url":"https://github.com/Edouard-chin/rails","description":"Ruby on Rails","fork":true,"url":"https://api.github.com/repos/Edouard-chin/rails","forks_url":"https://api.github.com/repos/Edouard-chin/rails/forks","keys_url":"https://api.github.com/repos/Edouard-chin/rails/keys{/key_id}","collaborators_url":"https://api.github.com/repos/Edouard-chin/rails/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/Edouard-chin/rails/teams","hooks_url":"https://api.github.com/repos/Edouard-chin/rails/hooks","issue_events_url":"https://api.github.com/repos/Edouard-chin/rails/issues/events{/number}","events_url":"https://api.github.com/repos/Edouard-chin/rails/events","assignees_url":"https://api.github.com/repos/Edouard-chin/rails/assignees{/user}","branches_url":"https://api.github.com/repos/Edouard-chin/rails/branches{/branch}","tags_url":"https://api.github.com/repos/Edouard-chin/rails/tags","blobs_url":"https://api.github.com/repos/Edouard-chin/rails/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/Edouard-chin/rails/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/Edouard-chin/rails/git/refs{/sha}","trees_url":"https://api.github.com/repos/Edouard-chin/rails/git/trees{/sha}","statuses_url":"https://api.github.com/repos/Edouard-chin/rails/statuses/{sha}","languages_url":"https://api.github.com/repos/Edouard-chin/rails/languages","stargazers_url":"https://api.github.com/repos/Edouard-chin/rails/stargazers","contributors_url":"https://api.github.com/repos/Edouard-chin/rails/contributors","subscribers_url":"https://api.github.com/repos/Edouard-chin/rails/subscribers","subscription_url":"https://api.github.com/repos/Edouard-chin/rails/subscription","commits_url":"https://api.github.com/repos/Edouard-chin/rails/commits{/sha}","git_commits_url":"https://api.github.com/repos/Edouard-chin/rails/git/commits{/sha}","comments_url":"https://api.github.com/repos/Edouard-chin/rails/comments{/number}","issue_comment_url":"https://api.github.com/repos/Edouard-chin/rails/issues/comments{/number}","contents_url":"https://api.github.com/repos/Edouard-chin/rails/contents/{+path}","compare_url":"https://api.github.com/repos/Edouard-chin/rails/compare/{base}...{head}","merges_url":"https://api.github.com/repos/Edouard-chin/rails/merges","archive_url":"https://api.github.com/repos/Edouard-chin/rails/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/Edouard-chin/rails/downloads","issues_url":"https://api.github.com/repos/Edouard-chin/rails/issues{/number}","pulls_url":"https://api.github.com/repos/Edouard-chin/rails/pulls{/number}","milestones_url":"https://api.github.com/repos/Edouard-chin/rails/milestones{/number}","notifications_url":"https://api.github.com/repos/Edouard-chin/rails/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/Edouard-chin/rails/labels{/name}","releases_url":"https://api.github.com/repos/Edouard-chin/rails/releases{/id}","deployments_url":"https://api.github.com/repos/Edouard-chin/rails/deployments","created_at":"2016-01-06T12:30:04Z","updated_at":"2018-07-19T17:18:38Z","pushed_at":"2018-10-12T17:27:19Z","git_url":"git://github.com/Edouard-chin/rails.git","ssh_url":"git@github.com:Edouard-chin/rails.git","clone_url":"https://github.com/Edouard-chin/rails.git","svn_url":"https://github.com/Edouard-chin/rails","homepage":"http://rubyonrails.org","size":162976,"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":"rails:master","ref":"master","sha":"99c87ad2474d5c5b6e52ceac34c3cf9f9cb57f9f","user":{"login":"rails","id":4223,"node_id":"MDEyOk9yZ2FuaXphdGlvbjQyMjM=","avatar_url":"https://avatars1.githubusercontent.com/u/4223?v=4","gravatar_id":"","url":"https://api.github.com/users/rails","html_url":"https://github.com/rails","followers_url":"https://api.github.com/users/rails/followers","following_url":"https://api.github.com/users/rails/following{/other_user}","gists_url":"https://api.github.com/users/rails/gists{/gist_id}","starred_url":"https://api.github.com/users/rails/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rails/subscriptions","organizations_url":"https://api.github.com/users/rails/orgs","repos_url":"https://api.github.com/users/rails/repos","events_url":"https://api.github.com/users/rails/events{/privacy}","received_events_url":"https://api.github.com/users/rails/received_events","type":"Organization","site_admin":false},"repo":{"id":8514,"node_id":"MDEwOlJlcG9zaXRvcnk4NTE0","name":"rails","full_name":"rails/rails","private":false,"owner":{"login":"rails","id":4223,"node_id":"MDEyOk9yZ2FuaXphdGlvbjQyMjM=","avatar_url":"https://avatars1.githubusercontent.com/u/4223?v=4","gravatar_id":"","url":"https://api.github.com/users/rails","html_url":"https://github.com/rails","followers_url":"https://api.github.com/users/rails/followers","following_url":"https://api.github.com/users/rails/following{/other_user}","gists_url":"https://api.github.com/users/rails/gists{/gist_id}","starred_url":"https://api.github.com/users/rails/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rails/subscriptions","organizations_url":"https://api.github.com/users/rails/orgs","repos_url":"https://api.github.com/users/rails/repos","events_url":"https://api.github.com/users/rails/events{/privacy}","received_events_url":"https://api.github.com/users/rails/received_events","type":"Organization","site_admin":false},"html_url":"https://github.com/rails/rails","description":"Ruby on Rails","fork":false,"url":"https://api.github.com/repos/rails/rails","forks_url":"https://api.github.com/repos/rails/rails/forks","keys_url":"https://api.github.com/repos/rails/rails/keys{/key_id}","collaborators_url":"https://api.github.com/repos/rails/rails/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/rails/rails/teams","hooks_url":"https://api.github.com/repos/rails/rails/hooks","issue_events_url":"https://api.github.com/repos/rails/rails/issues/events{/number}","events_url":"https://api.github.com/repos/rails/rails/events","assignees_url":"https://api.github.com/repos/rails/rails/assignees{/user}","branches_url":"https://api.github.com/repos/rails/rails/branches{/branch}","tags_url":"https://api.github.com/repos/rails/rails/tags","blobs_url":"https://api.github.com/repos/rails/rails/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/rails/rails/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/rails/rails/git/refs{/sha}","trees_url":"https://api.github.com/repos/rails/rails/git/trees{/sha}","statuses_url":"https://api.github.com/repos/rails/rails/statuses/{sha}","languages_url":"https://api.github.com/repos/rails/rails/languages","stargazers_url":"https://api.github.com/repos/rails/rails/stargazers","contributors_url":"https://api.github.com/repos/rails/rails/contributors","subscribers_url":"https://api.github.com/repos/rails/rails/subscribers","subscription_url":"https://api.github.com/repos/rails/rails/subscription","commits_url":"https://api.github.com/repos/rails/rails/commits{/sha}","git_commits_url":"https://api.github.com/repos/rails/rails/git/commits{/sha}","comments_url":"https://api.github.com/repos/rails/rails/comments{/number}","issue_comment_url":"https://api.github.com/repos/rails/rails/issues/comments{/number}","contents_url":"https://api.github.com/repos/rails/rails/contents/{+path}","compare_url":"https://api.github.com/repos/rails/rails/compare/{base}...{head}","merges_url":"https://api.github.com/repos/rails/rails/merges","archive_url":"https://api.github.com/repos/rails/rails/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/rails/rails/downloads","issues_url":"https://api.github.com/repos/rails/rails/issues{/number}","pulls_url":"https://api.github.com/repos/rails/rails/pulls{/number}","milestones_url":"https://api.github.com/repos/rails/rails/milestones{/number}","notifications_url":"https://api.github.com/repos/rails/rails/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/rails/rails/labels{/name}","releases_url":"https://api.github.com/repos/rails/rails/releases{/id}","deployments_url":"https://api.github.com/repos/rails/rails/deployments","created_at":"2008-04-11T02:19:47Z","updated_at":"2018-10-15T08:03:02Z","pushed_at":"2018-10-15T08:53:14Z","git_url":"git://github.com/rails/rails.git","ssh_url":"git@github.com:rails/rails.git","clone_url":"https://github.com/rails/rails.git","svn_url":"https://github.com/rails/rails","homepage":"https://rubyonrails.org","size":167531,"stargazers_count":41131,"watchers_count":41131,"language":"Ruby","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":16620,"mirror_url":null,"archived":false,"open_issues_count":1061,"license":{"key":"mit","name":"MIT License","spdx_id":"MIT","url":"https://api.github.com/licenses/mit","node_id":"MDc6TGljZW5zZTEz"},"forks":16620,"open_issues":1061,"watchers":41131,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/rails/rails/pulls/34135"},"html":{"href":"https://github.com/rails/rails/pull/34135"},"issue":{"href":"https://api.github.com/repos/rails/rails/issues/34135"},"comments":{"href":"https://api.github.com/repos/rails/rails/issues/34135/comments"},"review_comments":{"href":"https://api.github.com/repos/rails/rails/pulls/34135/comments"},"review_comment":{"href":"https://api.github.com/repos/rails/rails/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/rails/rails/pulls/34135/commits"},"statuses":{"href":"https://api.github.com/repos/rails/rails/statuses/c85e3f65f3409fc329732912908c3601d8e5fac9"}},"author_association":"CONTRIBUTOR","merged":true,"mergeable":null,"rebaseable":null,"mergeable_state":"unknown","merged_by":{"login":"pixeltrix","id":6321,"node_id":"MDQ6VXNlcjYzMjE=","avatar_url":"https://avatars0.githubusercontent.com/u/6321?v=4","gravatar_id":"","url":"https://api.github.com/users/pixeltrix","html_url":"https://github.com/pixeltrix","followers_url":"https://api.github.com/users/pixeltrix/followers","following_url":"https://api.github.com/users/pixeltrix/following{/other_user}","gists_url":"https://api.github.com/users/pixeltrix/gists{/gist_id}","starred_url":"https://api.github.com/users/pixeltrix/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/pixeltrix/subscriptions","organizations_url":"https://api.github.com/users/pixeltrix/orgs","repos_url":"https://api.github.com/users/pixeltrix/repos","events_url":"https://api.github.com/users/pixeltrix/events{/privacy}","received_events_url":"https://api.github.com/users/pixeltrix/received_events","type":"User","site_admin":false},"comments":4,"review_comments":0,"maintainer_can_modify":false,"commits":1,"additions":12,"deletions":3,"changed_files":3}}
{"actor":{"display_login":"pixeltrix"}}