Bug #459: Scanf Seems to Have Issues with Single Digit Integers
http://redmine.ruby-lang.org/issues/show/459

Author: James Gray
Status: Open, Priority: Normal

Switching a trivial example to use single digit integers causes scanf() to perform unexpectedly:

$ ruby -r scanf -e '"Name James Age 32 Name Greg Age 22".scanf("Name %s Age %i") { |name, age| p [name, age] }'
["James", 32]
["Greg", 22]
$ ruby -r scanf -e '"Name James Computers 2 Name Greg Computers 4".scanf("Name %s Age %i") { |name, age| p [name, age] }'
["James", nil]


----------------------------------------
http://redmine.ruby-lang.org