Skip to content

Commit

Permalink
Fix Array#reject, was working like Array#reject\!
Browse files Browse the repository at this point in the history
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@11437 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
  • Loading branch information
drbrain committed Dec 31, 2006
1 parent dcf4a0a commit 3e7566d
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 1 deletion.
4 changes: 4 additions & 0 deletions ChangeLog
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
Sun Dec 31 16:22:48 2006 Eric Hodel <[email protected]>

* array.c: Fix Array#reject.

Sun Dec 31 00:46:25 2006 Tadayoshi Funaba <[email protected]>

* lib/date2.rb: removed.
Expand Down
4 changes: 3 additions & 1 deletion array.c
Original file line number Diff line number Diff line change
Expand Up @@ -1942,7 +1942,9 @@ static VALUE
rb_ary_reject(VALUE ary)
{
RETURN_ENUMERATOR(ary, 0, 0);
return rb_ary_reject_bang(rb_ary_dup(ary));
ary = rb_ary_dup(ary);
rb_ary_reject_bang(ary);
return ary;
}

/*
Expand Down

0 comments on commit 3e7566d

Please sign in to comment.