Project

General

Profile

Actions

Bug #12035

closed

scanf suspicious results.

Added by PeterCamilleri (Peter Camilleri) almost 9 years ago. Updated almost 9 years ago.

Status:
Rejected
Assignee:
-
Target version:
-
ruby -v:
ruby 2.2.3p173 (2015-08-18 revision 51636) [i386-cygwin], ruby 2.1.6p336 (2015-04-13 revision 50298) [i386-mingw32], and ruby 1.9.3p484 (2013-11-22) [i386-mingw32]
[ruby-core:73585]

Description

The code: 'a b c'.scanf('%[a] %[b] %[c]')

yields the result: ["a"] and not ["a","b","c"] as expected.

So far it seems that when sets of characters are used, only
the first one in the parse specification string actually returns
any data.

Actions

Also available in: Atom PDF

Like0
Like0Like0Like0Like0Like0