* [ruby-core:54664] [CommonRuby - Feature #8343][Open] StringScanner#[] should accept names of named captures @ 2013-04-28 14:46 rkh (Konstantin Haase) 2013-04-28 17:45 ` [ruby-core:54674] [CommonRuby - Feature #8343] " rkh (Konstantin Haase) 2013-04-30 8:27 ` [ruby-core:54713] [CommonRuby - Feature #8343][Assigned] " naruse (Yui NARUSE) 0 siblings, 2 replies; 3+ messages in thread From: rkh (Konstantin Haase) @ 2013-04-28 14:46 UTC (permalink / raw To: ruby-core Issue #8343 has been reported by rkh (Konstantin Haase). ---------------------------------------- Feature #8343: StringScanner#[] should accept names of named captures https://bugs.ruby-lang.org/issues/8343 Author: rkh (Konstantin Haase) Status: Open Priority: Normal Assignee: Category: Target version: Example: s = StringScanner.new("Fri Dec 12 1975 14:39") s.scan(/(?<wday>\w+) (?<month>\w+) (?<day>\d+) /) # this currently works s[0] # -> "Fri Dec 12 " s[1] # -> "Fri" s[2] # -> "Dec" s[3] # -> "12" # this currently does not work s[:wday] # -> "Fri" s[:month] # -> "Dec" s[:day] # -> "12" I attached a patch including tests for MRI, I don't know if Rubinius has a different implementation, I guess JRuby has. I can look into this if the feature gets accepted. -- http://bugs.ruby-lang.org/ ^ permalink raw reply [flat|nested] 3+ messages in thread
* [ruby-core:54674] [CommonRuby - Feature #8343] StringScanner#[] should accept names of named captures 2013-04-28 14:46 [ruby-core:54664] [CommonRuby - Feature #8343][Open] StringScanner#[] should accept names of named captures rkh (Konstantin Haase) @ 2013-04-28 17:45 ` rkh (Konstantin Haase) 2013-04-30 8:27 ` [ruby-core:54713] [CommonRuby - Feature #8343][Assigned] " naruse (Yui NARUSE) 1 sibling, 0 replies; 3+ messages in thread From: rkh (Konstantin Haase) @ 2013-04-28 17:45 UTC (permalink / raw To: ruby-core Issue #8343 has been updated by rkh (Konstantin Haase). On a related note: should the patch be submitted in a second issue on the ruby-trunk project? ---------------------------------------- Feature #8343: StringScanner#[] should accept names of named captures https://bugs.ruby-lang.org/issues/8343#change-39016 Author: rkh (Konstantin Haase) Status: Open Priority: Normal Assignee: Category: Target version: Example: s = StringScanner.new("Fri Dec 12 1975 14:39") s.scan(/(?<wday>\w+) (?<month>\w+) (?<day>\d+) /) # this currently works s[0] # -> "Fri Dec 12 " s[1] # -> "Fri" s[2] # -> "Dec" s[3] # -> "12" # this currently does not work s[:wday] # -> "Fri" s[:month] # -> "Dec" s[:day] # -> "12" I attached a patch including tests for MRI, I don't know if Rubinius has a different implementation, I guess JRuby has. I can look into this if the feature gets accepted. -- http://bugs.ruby-lang.org/ ^ permalink raw reply [flat|nested] 3+ messages in thread
* [ruby-core:54713] [CommonRuby - Feature #8343][Assigned] StringScanner#[] should accept names of named captures 2013-04-28 14:46 [ruby-core:54664] [CommonRuby - Feature #8343][Open] StringScanner#[] should accept names of named captures rkh (Konstantin Haase) 2013-04-28 17:45 ` [ruby-core:54674] [CommonRuby - Feature #8343] " rkh (Konstantin Haase) @ 2013-04-30 8:27 ` naruse (Yui NARUSE) 1 sibling, 0 replies; 3+ messages in thread From: naruse (Yui NARUSE) @ 2013-04-30 8:27 UTC (permalink / raw To: ruby-core Issue #8343 has been updated by naruse (Yui NARUSE). Status changed from Open to Assigned Assignee set to naruse (Yui NARUSE) rkh (Konstantin Haase) wrote: > On a related note: should the patch be submitted in a second issue on the ruby-trunk project? Here is also correct place now. I'll merge this if there are no objection. ---------------------------------------- Feature #8343: StringScanner#[] should accept names of named captures https://bugs.ruby-lang.org/issues/8343#change-39059 Author: rkh (Konstantin Haase) Status: Assigned Priority: Normal Assignee: naruse (Yui NARUSE) Category: Target version: Example: s = StringScanner.new("Fri Dec 12 1975 14:39") s.scan(/(?<wday>\w+) (?<month>\w+) (?<day>\d+) /) # this currently works s[0] # -> "Fri Dec 12 " s[1] # -> "Fri" s[2] # -> "Dec" s[3] # -> "12" # this currently does not work s[:wday] # -> "Fri" s[:month] # -> "Dec" s[:day] # -> "12" I attached a patch including tests for MRI, I don't know if Rubinius has a different implementation, I guess JRuby has. I can look into this if the feature gets accepted. -- http://bugs.ruby-lang.org/ ^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2013-04-30 8:51 UTC | newest] Thread overview: 3+ messages (download: mbox.gz follow: Atom feed -- links below jump to the message on this page -- 2013-04-28 14:46 [ruby-core:54664] [CommonRuby - Feature #8343][Open] StringScanner#[] should accept names of named captures rkh (Konstantin Haase) 2013-04-28 17:45 ` [ruby-core:54674] [CommonRuby - Feature #8343] " rkh (Konstantin Haase) 2013-04-30 8:27 ` [ruby-core:54713] [CommonRuby - Feature #8343][Assigned] " naruse (Yui NARUSE)
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox; as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).