summaryrefslogtreecommitdiffhomepage
path: root/test/t
diff options
context:
space:
mode:
authorRobert Mosolgo <[email protected]>2014-11-24 09:30:45 -0800
committerYukihiro "Matz" Matsumoto <[email protected]>2014-11-26 01:03:38 +0900
commit0133d9ac70fd8d3ebe873e29c12cabfd3ff3f1a1 (patch)
tree8f293f7de5f4d6ed3151952469bf85626c1aad81 /test/t
parent28bd33297ad42c2eed1cca45345166a072b3bbf2 (diff)
downloadmruby-0133d9ac70fd8d3ebe873e29c12cabfd3ff3f1a1.tar.gz
mruby-0133d9ac70fd8d3ebe873e29c12cabfd3ff3f1a1.zip
fix(String) String#[] accepts float; close #2650 #2651
Diffstat (limited to 'test/t')
-rw-r--r--test/t/string.rb2
1 files changed, 2 insertions, 0 deletions
diff --git a/test/t/string.rb b/test/t/string.rb
index c0e545e87..a56862fe2 100644
--- a/test/t/string.rb
+++ b/test/t/string.rb
@@ -44,6 +44,7 @@ assert('String#[]', '15.2.10.5.6') do
b = 'abc'[-1]
c = 'abc'[10]
d = 'abc'[-10]
+ e = 'abc'[1.1]
# length of args is 2
a1 = 'abc'[0, -1]
@@ -63,6 +64,7 @@ assert('String#[]', '15.2.10.5.6') do
assert_equal 'c', b
assert_nil c
assert_nil d
+ assert_equal 'b', e
assert_nil a1
assert_nil b1
assert_nil c1