Commit 3b76aae4 authored by Tomoyuki Sahara's avatar Tomoyuki Sahara

fix ISO reference number of String#=~.

parent 3046cc7b
......@@ -135,7 +135,7 @@ class String
end
##
# ISO 15.2.10.5.5
# ISO 15.2.10.5.3
def =~(re)
if re.respond_to? :to_str
raise TypeError, "type mismatch: String given"
......
......@@ -28,6 +28,8 @@ assert('String#==', '15.2.10.5.2') do
assert_not_equal 'abc', 'cba'
end
# 'String#=~', '15.2.10.5.3' will be tested in mrbgems.
assert('String#+', '15.2.10.5.4') do
assert_equal 'ab', 'a' + 'b'
end
......@@ -36,8 +38,6 @@ assert('String#*', '15.2.10.5.5') do
assert_equal 'aaaaa', 'a' * 5
end
# 'String#=~', '15.2.10.5.5' will be tested in mrbgems.
assert('String#[]', '15.2.10.5.6') do
# length of args is 1
a = 'abc'[0]
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment