aboutsummaryrefslogtreecommitdiffstats
path: root/activesupport/lib/active_support/core_ext
diff options
context:
space:
mode:
authorAndrew White <pixeltrix@users.noreply.github.com>2016-10-21 07:03:32 +0100
committerGitHub <noreply@github.com>2016-10-21 07:03:32 +0100
commitf2c6db41ba56afb1529e4732c59622fc0cf9f3ba (patch)
tree75abdc2e5c40ece261b1db41ee1a1b7f61eefd5e /activesupport/lib/active_support/core_ext
parentdce4751a74342bd94802eb49b411663b66ace28b (diff)
parentfc72d6815ad6ed447f1aea2dd98579305ea1cca4 (diff)
downloadrails-f2c6db41ba56afb1529e4732c59622fc0cf9f3ba.tar.gz
rails-f2c6db41ba56afb1529e4732c59622fc0cf9f3ba.tar.bz2
rails-f2c6db41ba56afb1529e4732c59622fc0cf9f3ba.zip
Merge pull request #26839 from renuo/fix-missing-nsec-transfer
Fix copy_time_to: Copy nsec instead of usec
Diffstat (limited to 'activesupport/lib/active_support/core_ext')
-rw-r--r--activesupport/lib/active_support/core_ext/date_and_time/calculations.rb2
1 files changed, 1 insertions, 1 deletions
diff --git a/activesupport/lib/active_support/core_ext/date_and_time/calculations.rb b/activesupport/lib/active_support/core_ext/date_and_time/calculations.rb
index c614f14289..f2ba7fdda5 100644
--- a/activesupport/lib/active_support/core_ext/date_and_time/calculations.rb
+++ b/activesupport/lib/active_support/core_ext/date_and_time/calculations.rb
@@ -334,7 +334,7 @@ module DateAndTime
end
def copy_time_to(other)
- other.change(hour: hour, min: min, sec: sec, usec: try(:usec))
+ other.change(hour: hour, min: min, sec: sec, nsec: try(:nsec))
end
end
end