Commit 57cf2644 authored by Yukihiro "Matz" Matsumoto's avatar Yukihiro "Matz" Matsumoto

Merge pull request #1124 from kouki-o-iij/pr-kernel-notequal

bugfix: Kernel#!=, and add #!= testcase.
parents e6f61fa7 7e163c05
......@@ -108,7 +108,7 @@ mrb_obj_not_equal_m(mrb_state *mrb, mrb_value self)
mrb_bool eql_p;
mrb_get_args(mrb, "o", &arg);
eql_p = mrb_obj_equal(mrb, self, arg);
eql_p = mrb_equal(mrb, self, arg);
return mrb_bool_value(!eql_p);
}
......
......@@ -349,3 +349,13 @@ end
assert('Kernel#to_s', '15.3.1.3.46') do
to_s.class == String
end
assert('Kernel#!=') do
str1 = "hello"
str2 = str1
str3 = "world"
(str1[1] != 'e') == false and
(str1 != str3) == true and
(str2 != str1) == false
end
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