summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authoryugui <yugui@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2010-01-30 12:42:32 +0000
committeryugui <yugui@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2010-01-30 12:42:32 +0000
commit02b4b54a8342772d21fc7a646e2b6d0652da71b9 (patch)
tree3f35e4aacc9111b96b2ccf038d85d8cc58f4715e
parent0b0aafce5df8e2da2f69da7bad096d0076f7db03 (diff)
merges r25243 from trunk into ruby_1_9_1.
-- * struct.c (rb_struct_select): Struct#select should return enumerator when no block given. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_9_1@26472 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
-rw-r--r--ChangeLog5
-rw-r--r--struct.c1
-rw-r--r--version.h2
3 files changed, 7 insertions, 1 deletions
diff --git a/ChangeLog b/ChangeLog
index 1e429da282..a7dc4d8450 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+Tue Oct 6 18:56:09 2009 Yukihiro Matsumoto <matz@ruby-lang.org>
+
+ * struct.c (rb_struct_select): Struct#select should return
+ enumerator when no block given.
+
Sun Jan 10 17:25:24 2010 Nobuyoshi Nakada <nobu@ruby-lang.org>
* lib/webrick/accesslog.rb : Escape needed.
diff --git a/struct.c b/struct.c
index 79403a5fb6..92d375d548 100644
--- a/struct.c
+++ b/struct.c
@@ -750,6 +750,7 @@ rb_struct_select(int argc, VALUE *argv, VALUE s)
if (argc > 0) {
rb_raise(rb_eArgError, "wrong number of arguments (%d for 0)", argc);
}
+ RETURN_ENUMERATOR(s, 0, 0);
result = rb_ary_new();
for (i = 0; i < RSTRUCT_LEN(s); i++) {
if (RTEST(rb_yield(RSTRUCT_PTR(s)[i]))) {
diff --git a/version.h b/version.h
index 46cf3afa20..d7b253158a 100644
--- a/version.h
+++ b/version.h
@@ -1,5 +1,5 @@
#define RUBY_VERSION "1.9.1"
-#define RUBY_PATCHLEVEL 378
+#define RUBY_PATCHLEVEL 379
#define RUBY_VERSION_MAJOR 1
#define RUBY_VERSION_MINOR 9
#define RUBY_VERSION_TEENY 1