[Ruby 1.9-Feature#3995][Open] Hash#update with Enumerable

Feature #3995: Hash#update with Enumerable
http://redmine.ruby-lang.org/issues/show/3995

$B5/I<<T(B: Nobuyoshi N.
$B%9%F!<%?%9(B: Open, $BM%@john(B: Normal

[ruby-dev:42476]$B$G(BML$B$+$i$NEPO?$K<:GT$7$?$N$G:FEPO?$7$^$9(B

$B:#$N$H$3$m(BHash#update$B$O(BHash$B$7$+<u$1IU$1$^$;$s$,!"(BEnumerable$B$^$G(B
$B<u$1IU$1$k$h$&$K3HD%$9$k$N$O$I$&$G$7$g$&$+!#(B

$B$^$D$b$H(B $B$f$-$R$m$G$9(B

In message “Re: [ruby-dev:42477] [Ruby 1.9-Feature#3995][Open]
Hash#update with Enumerable”
on Thu, 28 Oct 2010 19:17:23 +0900, Nobuyoshi N.
[email protected] writes:

|$B:#$N$H$3$m(BHash#update$B$O(BHash$B$7$+<u$1IU$1$^$;$s$,!"(BEnumerable$B$^$G(B
|$B<u$1IU$1$k$h$&$K3HD%$9$k$N$O$I$&$G$7$g$&$+!#(B

[email protected]?BP$H$^$G$O$$$$$^$;$s$,!"(Beach$B$,JV$9$Y$-$b$N$,$J$K$+$H$+(B
[email protected]$5$K7g$1$k$h$&$J5$$,$7$^$9!#(B

[email protected]$G$9!#(B

At Thu, 28 Oct 2010 22:51:37 +0900,
Yukihiro M. wrote in [ruby-dev:42478]:

|$B:#$N$H$3$m(BHash#update$B$O(BHash$B$7$+<u$1IU$1$^$;$s$,!"(BEnumerable$B$^$G(B
|$B<u$1IU$1$k$h$&$K3HD%$9$k$N$O$I$&$G$7$g$&$+!#(B

[email protected]?BP$H$^$G$O$$$$$^$;$s$,!"(Beach$B$,JV$9$Y$-$b$N$,$J$K$+$H$+(B
[email protected]$5$K7g$1$k$h$&$J5$$,$7$^$9!#(B

each$B$,(Byield$B$9$k$Y$-$b$N$O(BHash[]$B$H9g$o$;$?$D$b$j$G$9!#(B

$B;H$$F;$H$7$F$O!"=EJ#$N%A%’%C%/$H$+!#(B

appearance = open(file) {|f|
{}.update(f.each_line.with_index) {|s, o, n| [*o, n]}
}

$B$^$D$b$H(B $B$f$-$R$m$G$9(B

In message “Re: [ruby-dev:42483] Re: [Ruby 1.9-Feature#3995][Open]
Hash#update with Enumerable”
on Fri, 29 Oct 2010 04:02:57 +0900, Nobuyoshi N.
[email protected] writes:

|> [email protected]?BP$H$^$G$O$$$$$^$;$s$,!"(Beach$B$,JV$9$Y$-$b$N$,$J$K$+$H$+(B
|> [email protected]$5$K7g$1$k$h$&$J5$$,$7$^$9!#(B
|
|each$B$,(Byield$B$9$k$Y$-$b$N$O(BHash[]$B$H9g$o$;$?$D$b$j$G$9!#(B

RB_TYPE_P()$B$r;H$C$F$O$$$1$J$$$h$&$J5$$,$7$^$9!#$;$a$F!"(B
rb_check_array_type() $B$r;H$&$Y$-$G$O$J$$$G$7$g$&$+!#(B

|$B;H$$F;$H$7$F$O!"=EJ#$N%A%’%C%/$H$+!#(B
|
| appearance = open(file) {|f|
| {}.update(f.each_line.with_index) {|s, o, n| [*o, n]}
| }

$B$&!<$s!">e5-$N<BAu$NLdBj$,$J$+$C$?$H$7$F$b!"$J$s$+%f!<%9%1!<(B
$B%9$H$7$F<e$$5$$,$9$k$N$G$9$,!#(B

This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.

| Privacy Policy | Terms of Service | Remote Ruby Jobs