ActionsLike0
Bug #12353
closedRegression with Marshal.dump on ruby 2.3.1p112 (2016-04-26 revision 54768) [x86_64-darwin15]
Status:
Closed
Assignee:
-
Target version:
-
ruby -v:
ruby 2.3.1p112 (2016-04-26 revision 54768) [x86_64-darwin15]
Description
Attempting to call Marshal.dump
on an ActiveSupport::CoreExtensions::Numeric::Time
(e.g., 1.day
) triggers a NoMethodError: undefined method `marshal_dump' for 86400:Fixnum
exception in both Ruby 2.3.0 and 2.3.1 on OS X (10.11.4) and in Travis CI with ActiveSupport 4.1.15. This works correctly in previous versions, including 2.2.5.
To reproduce:
% rbenv install 2.3.1
...
% rbenv global 2.3.1
% gem install activesupport -v 4.1.15
...
% ruby --version
ruby 2.3.1p112 (2016-04-26 revision 54768) [x86_64-darwin15]
% irb
irb(main):001:0> require 'active_support/core_ext/numeric/time'
=> true
irb(main):002:0> Marshal.dump(1.day)
NoMethodError: undefined method `marshal_dump' for 86400:Fixnum
from ~/.rbenv/versions/2.3.1/lib/ruby/gems/2.3.0/gems/activesupport-4.1.15/lib/active_support/duration.rb:115:in `method_missing'
from (irb):2:in `dump'
from (irb):2
from ~/.rbenv/versions/2.3.1/bin/irb:11:in `<main>'
In 2.2.5:
% rbenv install 2.2.5
...
% rbenv global 2.2.5
% gem install activesupport -v 4.1.15
...
% ruby --version
ruby 2.2.5p319 (2016-04-26 revision 54774) [x86_64-darwin15]
% irb
irb(main):001:0> require 'active_support/core_ext/numeric/time'
=> true
irb(main):002:0> Marshal.dump(1.day)
=> "\x04\bo:\x1CActiveSupport::Duration\a:\v@valuei\x03\x80Q\x01:\v@parts[\x06[\a:\tdaysi\x06"
Updated by nobu (Nobuyoshi Nakada) almost 9 years ago
- Status changed from Open to Feedback
Updated by usa (Usaku NAKAMURA) over 8 years ago
- Backport changed from 2.1: UNKNOWN, 2.2: UNKNOWN, 2.3: UNKNOWN to 2.1: DONTNEED, 2.2: DONTNEED, 2.3: REQUIRED
Updated by nagachika (Tomoyuki Chikanaga) over 8 years ago
- Backport changed from 2.1: DONTNEED, 2.2: DONTNEED, 2.3: REQUIRED to 2.1: DONTNEED, 2.2: DONTNEED, 2.3: DONE
Updated by knu (Akinori MUSHA) over 8 years ago
- Status changed from Closed to Open
Updated by nagachika (Tomoyuki Chikanaga) over 8 years ago
- Status changed from Closed to Open
- Backport changed from 2.1: DONTNEED, 2.2: DONTNEED, 2.3: DONE to 2.1: DONTNEED, 2.2: DONTNEED, 2.3: REQUIRED
ActionsLike0