зеркало из https://github.com/github/ruby.git
Cleaning up syntax warnings.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@27520 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
Родитель
430e0ce491
Коммит
2f40495328
|
@ -146,7 +146,7 @@ module Exception2MessageMapper
|
|||
E2MM.Fail E2MM, ErrNotRegisteredException, err.inspect
|
||||
end
|
||||
end
|
||||
class <<E2MM
|
||||
class << E2MM
|
||||
alias Fail Raise
|
||||
end
|
||||
|
||||
|
@ -160,7 +160,7 @@ module Exception2MessageMapper
|
|||
end
|
||||
nil
|
||||
end
|
||||
class <<self
|
||||
class << self
|
||||
alias message e2mm_message
|
||||
end
|
||||
|
||||
|
|
|
@ -182,7 +182,7 @@ class TestRubyOptions < Test::Unit::TestCase
|
|||
end
|
||||
|
||||
def test_syntax_check
|
||||
assert_in_out_err(%w(-c -e 1+1), "", ["Syntax OK"], [])
|
||||
assert_in_out_err(%w(-c -e a=1+1), "", ["Syntax OK"], [])
|
||||
end
|
||||
|
||||
def test_invalid_option
|
||||
|
|
|
@ -4,7 +4,7 @@ require_relative 'ruby/envutil'
|
|||
# mathn redefines too much. It must be isolated to child processes.
|
||||
class TestMathn < Test::Unit::TestCase
|
||||
def test_power
|
||||
assert_in_out_err ['-r', 'mathn', '-e', '1**2'], "", [], [], '[ruby-core:25740]'
|
||||
assert_in_out_err ['-r', 'mathn', '-e', '(1<<126)**2'], "", [], [], '[ruby-core:25740]'
|
||||
assert_in_out_err ['-r', 'mathn', '-e', 'a=1**2'], "", [], [], '[ruby-core:25740]'
|
||||
assert_in_out_err ['-r', 'mathn', '-e', 'a=(1<<126)**2'], "", [], [], '[ruby-core:25740]'
|
||||
end
|
||||
end
|
||||
|
|
Загрузка…
Ссылка в новой задаче