ruby-changes:55950
From: Hiroshi <ko1@a...>
Date: Sat, 1 Jun 2019 21:08:23 +0900 (JST)
Subject: [ruby-changes:55950] Hiroshi SHIBATA: 3c77ef9adc (trunk): Ignore warnings about ambiguous first argument with the negative integer.
https://git.ruby-lang.org/ruby.git/commit/?id=3c77ef9adc From 3c77ef9adc567af58e27c62db35d618f3b3069d2 Mon Sep 17 00:00:00 2001 From: Hiroshi SHIBATA <hsbt@r...> Date: Sat, 1 Jun 2019 15:07:35 +0300 Subject: Ignore warnings about ambiguous first argument with the negative integer. diff --git a/test/json/json_parser_test.rb b/test/json/json_parser_test.rb index 68aeb57..9946dd9 100644 --- a/test/json/json_parser_test.rb +++ b/test/json/json_parser_test.rb @@ -91,22 +91,22 @@ class JSONParserTest < Test::Unit::TestCase https://github.com/ruby/ruby/blob/trunk/test/json/json_parser_test.rb#L91 assert_raise(JSON::ParserError) { parse('+23') } assert_raise(JSON::ParserError) { parse('.23') } assert_raise(JSON::ParserError) { parse('023') } - assert_equal 23, parse('23') - assert_equal -23, parse('-23') - assert_equal_float 3.141, parse('3.141') - assert_equal_float -3.141, parse('-3.141') - assert_equal_float 3.141, parse('3141e-3') - assert_equal_float 3.141, parse('3141.1e-3') - assert_equal_float 3.141, parse('3141E-3') - assert_equal_float 3.141, parse('3141.0E-3') - assert_equal_float -3.141, parse('-3141.0e-3') - assert_equal_float -3.141, parse('-3141e-3') + assert_equal(23, parse('23')) + assert_equal(-23, parse('-23')) + assert_equal_float(3.141, parse('3.141')) + assert_equal_float(-3.141, parse('-3.141')) + assert_equal_float(3.141, parse('3141e-3')) + assert_equal_float(3.141, parse('3141.1e-3')) + assert_equal_float(3.141, parse('3141E-3')) + assert_equal_float(3.141, parse('3141.0E-3')) + assert_equal_float(-3.141, parse('-3141.0e-3')) + assert_equal_float(-3.141, parse('-3141e-3')) assert_raise(ParserError) { parse('NaN') } assert parse('NaN', :allow_nan => true).nan? assert_raise(ParserError) { parse('Infinity') } - assert_equal 1.0/0, parse('Infinity', :allow_nan => true) + assert_equal(1.0/0, parse('Infinity', :allow_nan => true)) assert_raise(ParserError) { parse('-Infinity') } - assert_equal -1.0/0, parse('-Infinity', :allow_nan => true) + assert_equal(-1.0/0, parse('-Infinity', :allow_nan => true)) end def test_parse_bigdecimals diff --git a/test/openssl/test_x509name.rb b/test/openssl/test_x509name.rb index e31b5e2..f014659 100644 --- a/test/openssl/test_x509name.rb +++ b/test/openssl/test_x509name.rb @@ -409,12 +409,12 @@ class OpenSSL::TestX509Name < OpenSSL::TestCase https://github.com/ruby/ruby/blob/trunk/test/openssl/test_x509name.rb#L409 n2 = OpenSSL::X509::Name.new([["CN", "a"]]) n3 = OpenSSL::X509::Name.new([["CN", "ab"]]) - assert_equal 0, n1 <=> n2 - assert_equal -1, n1 <=> n3 - assert_equal 0, n2 <=> n1 - assert_equal -1, n2 <=> n3 - assert_equal 1, n3 <=> n1 - assert_equal 1, n3 <=> n2 + assert_equal(0, n1 <=> n2) + assert_equal(-1, n1 <=> n3) + assert_equal(0, n2 <=> n1) + assert_equal(-1, n2 <=> n3) + assert_equal(1, n3 <=> n1) + assert_equal(1, n3 <=> n2) end def name_hash(name) -- cgit v0.10.2 -- ML: ruby-changes@q... Info: http://www.atdot.net/~ko1/quickml/