Actions
Bug #5763
closedsprintf not throwing error for wrong number of arguments
Bug #5763:
sprintf not throwing error for wrong number of arguments
Description
sprintf should raise error when the number of arguments does not match the number of format specifiers
sprintf with correct number of format specifiers, arguments
sprintf('%s', 'hello')
=> "hello"
sprintf with a single format specifier and two arguments
sprintf('%s', 'hello', 'world!')
=> "hello"
sprintf with three format specifiers and two arguments
sprintf('%s-%s-%s', 'hello', 'world!')
ArgumentError: too few arguments
from (irb):3:insprintf' from (irb):3 from /home/chaitanyav/development/tools_64/bin/irb:12:in
'
Actions