summaryrefslogtreecommitdiffhomepage
path: root/test
diff options
context:
space:
mode:
authorYukihiro "Matz" Matsumoto <[email protected]>2013-01-29 05:35:15 -0800
committerYukihiro "Matz" Matsumoto <[email protected]>2013-01-29 05:35:15 -0800
commite18a9c0a56aebcee004cd039c97667b56106e6aa (patch)
treefca1f4d4a5c15ce55c7604e5208abdde47f06bf3 /test
parent14c97e824327fd103e81bd27907715c6e1a58b39 (diff)
parent7941dfb44a1c843c990d1ba0b65071e21f83520d (diff)
downloadmruby-e18a9c0a56aebcee004cd039c97667b56106e6aa.tar.gz
mruby-e18a9c0a56aebcee004cd039c97667b56106e6aa.zip
Merge pull request #788 from masamitsu-murase/modify_range_initialize
Modify range initialize to prevent segmentation fault.
Diffstat (limited to 'test')
-rw-r--r--test/t/range.rb15
1 files changed, 7 insertions, 8 deletions
diff --git a/test/t/range.rb b/test/t/range.rb
index 691ca7898..21bcb5c55 100644
--- a/test/t/range.rb
+++ b/test/t/range.rb
@@ -48,14 +48,13 @@ assert('Range#include', '15.2.14.4.8') do
a.include?(5) and not a.include?(20)
end
-# TODO SEGFAULT ATM
-#assert('Range#initialize', '15.2.14.4.9') do
-# a = Range.new(1, 10, true)
-# b = Range.new(1, 10, false)
-#
-# a == (1..10) and a.exclude_end? and b == (1..10) and
-# not b.exclude_end?
-#end
+assert('Range#initialize', '15.2.14.4.9') do
+ a = Range.new(1, 10, true)
+ b = Range.new(1, 10, false)
+
+ a == (1...10) and a.exclude_end? and b == (1..10) and
+ not b.exclude_end?
+end
assert('Range#last', '15.2.14.4.10') do
(1..10).last == 10