summaryrefslogtreecommitdiff
path: root/class.c
diff options
context:
space:
mode:
authormatz <matz@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2003-05-04 16:03:24 +0000
committermatz <matz@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2003-05-04 16:03:24 +0000
commitf595d5b0d24d9b0323aba79ae07a6e1c9dbfbe36 (patch)
treea6f751d98db26e466d957576ef3fee9974cbb471 /class.c
parentf001f2f6d584d948b9b321171875ee872048df23 (diff)
* array.c (rb_ary_values_at): new method to replace select(index..).
* hash.c (rb_hash_values_at,env_values_at): ditto. * re.c (match_values_at): ditto. * struct.c (rb_struct_values_at): ditto. * re.c (match_select): add iterator behavior. * ext/curses/curses.c, ext/digest/sha2/sha2.c, ext/iconv/iconv.c, ext/racc/cparse/cparse.c: include "ruby.h" at the top to shut up "_FILE_OFFSET_BITS redefined" warning on Solaris. * class.c (rb_class_protected_instance_methods): now gives warnings to show migration path. The default will be reversed on Jan 2004. * numeric.c (num_step): "1.1.step(1.5,0.1)" to work. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@3754 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'class.c')
-rw-r--r--class.c29
1 files changed, 23 insertions, 6 deletions
diff --git a/class.c b/class.c
index be2be7e5ae..c0d7c1ed5f 100644
--- a/class.c
+++ b/class.c
@@ -564,8 +564,11 @@ rb_class_instance_methods(argc, argv, mod)
rb_scan_args(argc, argv, "01", &recur);
if (argc == 0) {
- rb_warn("instance_methods() default to true; specify false explicitly");
+#if RUBY_RELEASE_CODE < 20040101
+ rb_warn("instance_methods parameter will default to 'true' in Jan 2004");
+#else
recur = Qtrue;
+#endif
}
return method_list(mod, RTEST(recur), ins_methods_i);
}
@@ -580,8 +583,11 @@ rb_class_protected_instance_methods(argc, argv, mod)
rb_scan_args(argc, argv, "01", &recur);
if (argc == 0) {
- rb_warn("protected_instance_methods() default to true; specify false explicitly");
+#if RUBY_RELEASE_CODE < 20040101
+ rb_warn("protected_instance_methods parameter will default to 'true' in Jan 2004");
+#else
recur = Qtrue;
+#endif
}
if (argc == 0) recur = Qtrue;
return method_list(mod, RTEST(recur), ins_methods_prot_i);
@@ -597,8 +603,11 @@ rb_class_private_instance_methods(argc, argv, mod)
rb_scan_args(argc, argv, "01", &recur);
if (argc == 0) {
- rb_warn("private_instance_methods() default to true; specify false explicitly");
+#if RUBY_RELEASE_CODE < 20040101
+ rb_warn("private_instance_methods parameter will default to 'true' in Jan 2004");
+#else
recur = Qtrue;
+#endif
}
if (argc == 0) recur = Qtrue;
return method_list(mod, RTEST(recur), ins_methods_priv_i);
@@ -614,8 +623,13 @@ rb_class_public_instance_methods(argc, argv, mod)
rb_scan_args(argc, argv, "01", &recur);
if (argc == 0) {
- rb_warn("public_instance_methods() default to true; specify false explicitly");
+#if RUBY_RELEASE_CODE < 20040101
+ rb_warn("instance_methods parameter will default to 'true' in Jan 2004");
+#else
recur = Qtrue;
+#endif
+ rb_warn("public_instance_methods parameter will default to 'true' in Jan 2004");
+ /* recur = Qtrue; */
}
if (argc == 0) recur = Qtrue;
return method_list(mod, RTEST(recur), ins_methods_pub_i);
@@ -632,8 +646,11 @@ rb_obj_singleton_methods(argc, argv, obj)
rb_scan_args(argc, argv, "01", &all);
if (argc == 0) {
- rb_warn("singleton_methods() default to true; specify false explicitly");
- all = Qtrue;
+#if RUBY_RELEASE_CODE < 20040101
+ rb_warn("singleton_methods parameter will default to 'true' in Jan 2004");
+#else
+ recur = Qtrue;
+#endif
}
klass = CLASS_OF(obj);
list = st_init_numtable();