* ext/date/date_core.c (d_lite_cmp): should compare with #<.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@45520 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
parent
685af965fd
commit
cce3aa754b
@ -1,3 +1,7 @@
|
|||||||
|
Sat Apr 5 19:36:33 2014 Tadayoshi Funaba <tadf@dotrb.org>
|
||||||
|
|
||||||
|
* ext/date/date_core.c (d_lite_cmp): should compare with #<.
|
||||||
|
|
||||||
Sat Apr 5 00:31:21 2014 Nobuyoshi Nakada <nobu@ruby-lang.org>
|
Sat Apr 5 00:31:21 2014 Nobuyoshi Nakada <nobu@ruby-lang.org>
|
||||||
|
|
||||||
* ext/readline/extconf.rb (rl_hook_func_t): check pointer type.
|
* ext/readline/extconf.rb (rl_hook_func_t): check pointer type.
|
||||||
|
@ -6283,7 +6283,7 @@ d_lite_cmp(VALUE self, VALUE other)
|
|||||||
return INT2FIX(1);
|
return INT2FIX(1);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else if (a_nth < b_nth) {
|
else if (f_lt_p(a_nth, b_nth)) {
|
||||||
return INT2FIX(-1);
|
return INT2FIX(-1);
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
|
@ -312,6 +312,8 @@ class TestSH < Test::Unit::TestCase
|
|||||||
assert_equal(-1, Date.new(2001,2,3) <=> Rational('4903888/2'))
|
assert_equal(-1, Date.new(2001,2,3) <=> Rational('4903888/2'))
|
||||||
assert_equal(0, Date.new(2001,2,3) <=> Rational('4903887/2'))
|
assert_equal(0, Date.new(2001,2,3) <=> Rational('4903887/2'))
|
||||||
assert_equal(1, Date.new(2001,2,3) <=> Rational('4903886/2'))
|
assert_equal(1, Date.new(2001,2,3) <=> Rational('4903886/2'))
|
||||||
|
|
||||||
|
assert_equal(-1, Date.new(-4713,11,1,Date::GREGORIAN) <=> Date.new(-4713,12,1,Date::GREGORIAN))
|
||||||
end
|
end
|
||||||
|
|
||||||
def test_eqeqeq
|
def test_eqeqeq
|
||||||
|
Loading…
x
Reference in New Issue
Block a user