mirror of
https://github.com/ruby/ruby.git
synced 2025-08-15 13:39:04 +02:00
Alias Struct#select as Struct#filter. Patch by Kenichi Kamiya.
[Fix GH-#1862] [#1784] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@64759 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
parent
2b3982ad1c
commit
c22b853737
6 changed files with 53 additions and 22 deletions
1
struct.c
1
struct.c
|
@ -1297,6 +1297,7 @@ InitVM_Struct(void)
|
|||
rb_define_method(rb_cStruct, "[]", rb_struct_aref, 1);
|
||||
rb_define_method(rb_cStruct, "[]=", rb_struct_aset, 2);
|
||||
rb_define_method(rb_cStruct, "select", rb_struct_select, -1);
|
||||
rb_define_method(rb_cStruct, "filter", rb_struct_select, -1);
|
||||
rb_define_method(rb_cStruct, "values_at", rb_struct_values_at, -1);
|
||||
|
||||
rb_define_method(rb_cStruct, "members", rb_struct_members_m, 0);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue