summaryrefslogtreecommitdiff
path: root/test/ruby
diff options
context:
space:
mode:
authorocean <ocean@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2006-02-17 02:21:39 +0000
committerocean <ocean@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2006-02-17 02:21:39 +0000
commit386352b47463a112027a227cefc86b226ed8fd7b (patch)
treefdfa3437bb61bdbd7fbe821683bdd82f65ee5313 /test/ruby
parent26899051a0456daffa5ddbaecc8fa566dad49dfc (diff)
* util.c (ruby_strtod): Float("1e") should fail. [ruby-core:7330]
* pack.c (EXTEND32): unpack("l") did not work where sizeof(long) != 4. [ruby-talk:180024] * pack.c (pack_unpack): fixed integer overflow on template "w". [ruby-talk:180126] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_8@9947 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'test/ruby')
-rw-r--r--test/ruby/test_float.rb1
-rw-r--r--test/ruby/test_pack.rb3
2 files changed, 4 insertions, 0 deletions
diff --git a/test/ruby/test_float.rb b/test/ruby/test_float.rb
index fb180ff81b..63979b5be0 100644
--- a/test/ruby/test_float.rb
+++ b/test/ruby/test_float.rb
@@ -84,6 +84,7 @@ class TestFloat < Test::Unit::TestCase
assert_raise(ArgumentError){Float("+.")}
assert_raise(ArgumentError){Float("-")}
assert_raise(ArgumentError){Float("-.")}
+ assert_raise(ArgumentError){Float("1e")}
# add expected behaviour here.
end
end
diff --git a/test/ruby/test_pack.rb b/test/ruby/test_pack.rb
index a9f15599e4..e67465b33a 100644
--- a/test/ruby/test_pack.rb
+++ b/test/ruby/test_pack.rb
@@ -15,6 +15,9 @@ class TestPack < Test::Unit::TestCase
$x = [-1073741825]
assert_equal($x, $x.pack("q").unpack("q"))
+
+ $x = [-1]
+ assert_equal($x, $x.pack("l").unpack("l"))
end
def test_pack_N