diff options
| author | nobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2005-06-30 16:46:13 +0000 |
|---|---|---|
| committer | nobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2005-06-30 16:46:13 +0000 |
| commit | d946d0a66c41860d9ffbe56491508288ef41e0a8 (patch) | |
| tree | f0d96f9455ea14850f22277f6075941b7e35e970 /enum.c | |
| parent | 8791bd236fd90c54f2de202309b1e1ed382509a7 (diff) | |
| download | ruby-d946d0a66c41860d9ffbe56491508288ef41e0a8.tar.gz ruby-d946d0a66c41860d9ffbe56491508288ef41e0a8.tar.xz ruby-d946d0a66c41860d9ffbe56491508288ef41e0a8.zip | |
* enum.c (enum_min, enum_max): must not return Qundef.
fixed: [ruby-core:05299]
git-svn-id: http://svn.ruby-lang.org/repos/ruby/branches/ruby_1_8@8685 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'enum.c')
| -rw-r--r-- | enum.c | 2 |
1 files changed, 2 insertions, 0 deletions
@@ -660,6 +660,7 @@ enum_min(obj) VALUE result = Qundef; rb_iterate(rb_each, obj, rb_block_given_p() ? min_ii : min_i, (VALUE)&result); + if (result == Qundef) return Qnil; return result; } @@ -736,6 +737,7 @@ enum_max(obj) VALUE result = Qundef; rb_iterate(rb_each, obj, rb_block_given_p() ? max_ii : max_i, (VALUE)&result); + if (result == Qundef) return Qnil; return result; } |
