Project

General

Profile

Bug #12866 ยป 0001-Complex-should-not-respond-to-clamp.patch

timocp (Tim Peters), 10/23/2016 01:50 AM

View differences:

complex.c
rb_undef_method(rb_cComplex, ">");
rb_undef_method(rb_cComplex, ">=");
rb_undef_method(rb_cComplex, "between?");
rb_undef_method(rb_cComplex, "clamp");
rb_undef_method(rb_cComplex, "div");
rb_undef_method(rb_cComplex, "divmod");
rb_undef_method(rb_cComplex, "floor");
test/ruby/test_complex.rb
assert_equal(false, c.respond_to?(:>))
assert_equal(false, c.respond_to?(:>=))
assert_equal(false, c.respond_to?(:between?))
assert_equal(false, c.respond_to?(:clamp))
assert_equal(false, c.respond_to?(:div))
assert_equal(false, c.respond_to?(:divmod))
assert_equal(false, c.respond_to?(:floor))
    (1-1/1)