From 359d53787821dc287d0411565801d54791f0a9c6 Mon Sep 17 00:00:00 2001 From: nobu Date: Thu, 5 Aug 2010 09:25:39 +0000 Subject: * marshal.c (w_float): should not append a dot if no fractal part exists. [ruby-dev:41936] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@28868 b2dd03c8-39d4-4d8f-98ff-823fe69b080e --- test/ruby/test_marshal.rb | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'test/ruby') diff --git a/test/ruby/test_marshal.rb b/test/ruby/test_marshal.rb index d78183192c..f3d86277dd 100644 --- a/test/ruby/test_marshal.rb +++ b/test/ruby/test_marshal.rb @@ -40,6 +40,11 @@ class TestMarshal < Test::Unit::TestCase obj = (x.to_f + y.to_f / z.to_f) * Math.exp(w.to_f / (x.to_f + y.to_f / z.to_f)) assert_equal obj, Marshal.load(Marshal.dump(obj)) } + + bug3659 = '[ruby-dev:41936]' + [1.0, 10.0, 100.0, 110.0].each {|x| + assert_equal(x, Marshal.load(Marshal.dump(x)), bug3659) + } end StrClone = String.clone -- cgit v1.2.3