mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
* test/ruby/test_parse.rb (TestParse::test_void_expr_stmts_value):
shut up warning. * rational.c (nurat_to_f): no need for forceful warning when converting to float. overflow is a nature of float values. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@16252 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
parent
a60856f010
commit
78008d342e
4 changed files with 15 additions and 6 deletions
|
@ -1,4 +1,5 @@
|
|||
require 'test/unit'
|
||||
require 'stringio'
|
||||
|
||||
class TestParse < Test::Unit::TestCase
|
||||
def setup
|
||||
|
@ -762,6 +763,8 @@ x = __ENCODING__
|
|||
# This test checks if void contexts are warned correctly.
|
||||
# Thus, warnings MUST NOT be suppressed.
|
||||
$VERBOSE = true
|
||||
stderr = $stderr
|
||||
$stderr = StringIO.new("")
|
||||
x = 1
|
||||
assert_nil eval("x; nil")
|
||||
assert_nil eval("1+1; nil")
|
||||
|
@ -785,6 +788,8 @@ x = __ENCODING__
|
|||
x = def o.foo; end
|
||||
END
|
||||
end
|
||||
assert_equal($stderr.string.lines.to_a.size, 14)
|
||||
$stderr = stderr
|
||||
end
|
||||
|
||||
def test_assign_in_conditional
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue