diff options
Diffstat (limited to 'spec/ruby/core/time/_load_spec.rb')
| -rw-r--r-- | spec/ruby/core/time/_load_spec.rb | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/spec/ruby/core/time/_load_spec.rb b/spec/ruby/core/time/_load_spec.rb index 152934370f..a74e3dc129 100644 --- a/spec/ruby/core/time/_load_spec.rb +++ b/spec/ruby/core/time/_load_spec.rb @@ -1,9 +1,9 @@ -# -*- encoding: binary -*- +# encoding: binary require_relative '../../spec_helper' describe "Time._load" do it "is a private method" do - Time.should have_private_method(:_load, false) + Time.private_methods(false).should.include?(:_load) end # http://redmine.ruby-lang.org/issues/show/627 @@ -44,8 +44,7 @@ describe "Time._load" do end it "treats the data as binary data" do - data = "\x04\bu:\tTime\r\fM\x1C\xC0\x00\x00\xD0\xBE" - data.force_encoding Encoding::UTF_8 + data = "\x04\bu:\tTime\r\fM\x1C\xC0\x00\x00\xD0\xBE".dup.force_encoding Encoding::UTF_8 t = Marshal.load(data) t.to_s.should == "2013-04-08 12:47:45 UTC" end |
