ruby-changes:73004
From: Nobuyoshi <ko1@a...>
Date: Sun, 21 Aug 2022 20:01:56 +0900 (JST)
Subject: [ruby-changes:73004] 0cc989696e (master): Add invalid hexadecimal float tests
https://git.ruby-lang.org/ruby.git/commit/?id=0cc989696e From 0cc989696e9a7d0386773d23aa64de8fc04ea9fe Mon Sep 17 00:00:00 2001 From: Nobuyoshi Nakada <nobu@r...> Date: Thu, 1 Jul 2021 06:38:33 +0900 Subject: Add invalid hexadecimal float tests --- test/ruby/test_float.rb | 3 +++ 1 file changed, 3 insertions(+) diff --git a/test/ruby/test_float.rb b/test/ruby/test_float.rb index 57a46fce92..fdc5d28ed7 100644 --- a/test/ruby/test_float.rb +++ b/test/ruby/test_float.rb @@ -141,6 +141,9 @@ class TestFloat < Test::Unit::TestCase https://github.com/ruby/ruby/blob/trunk/test/ruby/test_float.rb#L141 assert_raise(ArgumentError){Float("1__1")} assert_raise(ArgumentError){Float("1.")} assert_raise(ArgumentError){Float("1.e+00")} + assert_raise(ArgumentError){Float("0x.1")} + assert_raise(ArgumentError){Float("0x1.")} + assert_raise(ArgumentError){Float("0x1.0")} assert_raise(ArgumentError){Float("0x1.p+0")} # add expected behaviour here. assert_equal(10, Float("1_0")) -- cgit v1.2.1 -- ML: ruby-changes@q... Info: http://www.atdot.net/~ko1/quickml/