General

Profile

sorah Shota Fukumori

  • Email: her@sorah.jp
  • Registered on: 02/15/2010
  • Last connection: 08/20/2016

Issues

Projects

Activity

09/26/2016

06:27 PM Ruby trunk Feature #12075: some container#nonempty?
I know any? works on some use cases, but I'm positive to have a proposed method because using `any?` has a pitfall. W...

05/19/2016

05:21 PM Ruby trunk Revision 55076: fix a typo

02/18/2016

05:28 AM Ruby trunk Feature #11999 (Closed): MatchData#to_h to get a Hash from named captures
Applied in changeset r53863.
----------
* re.c: Add MatchData#named_captures
[Feature #11999] [ruby-core:72897]
*...

02/16/2016

12:35 PM Ruby trunk Feature #11999: MatchData#to_h to get a Hash from named captures
Updated patch (11999-2.diff).
11:24 AM Ruby trunk Feature #11999: MatchData#to_h to get a Hash from named captures
Discussed at https://bugs.ruby-lang.org/projects/ruby/wiki/DevelopersMeeting20160216Japan with Matz and several commi...

01/20/2016

11:25 AM Ruby trunk Feature #11999: MatchData#to_h to get a Hash from named captures
that makes sense for me.

01/19/2016

08:51 AM Ruby trunk Feature #11999: MatchData#to_h to get a Hash from named captures
Looks like it's the same problem as I noted here https://bugs.ruby-lang.org/issues/11999#note-2

01/18/2016

04:53 PM Ruby trunk Feature #11999: MatchData#to_h to get a Hash from named captures
> is not always able to convert to Hash/Map.
Ah -- agreed. How about MatchData#named_captures?
I can't think t...
08:57 AM Ruby trunk Feature #11999: MatchData#to_h to get a Hash from named captures
Consideration is behavior for multiple captures with same group name:
~~~
/(?<a>.)(?<a>.)/
~~~
MatchData#[] r...
06:37 AM Ruby trunk Feature #11999 (Closed): MatchData#to_h to get a Hash from named captures
~~~
class MatchData
def to_h
self.names.map { |n| [n, self[n]] }.to_h
end
end
p '12'.match(/(?<a>.)(?...

Also available in: Atom