mirror of
https://github.com/ruby/ruby.git
synced 2025-08-28 07:26:00 +02:00
sprintf.c: remove extra parentheses
* sprintf.c (GETASTER): remove extra parentheses from the second argument so that the error message does not contain them. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@46564 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
parent
767358108e
commit
57d6cb4af9
2 changed files with 7 additions and 1 deletions
|
@ -309,6 +309,12 @@ class TestSprintf < Test::Unit::TestCase
|
|||
|
||||
def test_star
|
||||
assert_equal("-1 ", sprintf("%*d", -3, -1))
|
||||
assert_raise_with_message(ArgumentError, /width too big/) {
|
||||
sprintf("%*999999999999999999999999999999999999999999999999999999999999$d", 1)
|
||||
}
|
||||
assert_raise_with_message(ArgumentError, /prec too big/) {
|
||||
sprintf("%.*999999999999999999999999999999999999999999999999999999999999$d", 1)
|
||||
}
|
||||
end
|
||||
|
||||
def test_escape
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue