[#42] Re: possible bug: stack dump with <<-String, #{...} and large loops — ts <decoux@...>

32 messages 2002/05/25
[#43] Re: possible bug: stack dump with <<-String, #{...} and large loops — nobu.nokada@... 2002/05/26

Hi,

[#45] Re: possible bug: stack dump with <<-String, #{...} and large loops — ts <decoux@...> 2002/05/26

>>>>> "n" == nobu nokada <nobu.nokada@softhome.net> writes:

[#46] Re: possible bug: stack dump with <<-String, #{...} and large loops — nobu.nokada@... 2002/05/26

Hi,

[#47] Re: possible bug: stack dump with <<-String, #{...} and large loops — ts <decoux@...> 2002/05/26

>>>>> "n" == nobu nokada <nobu.nokada@softhome.net> writes:

[#48] Re: possible bug: stack dump with <<-String, #{...} and large loops — ts <decoux@...> 2002/05/26

>>>>> "t" == ts <decoux@moulon.inra.fr> writes:

[#49] Re: possible bug: stack dump with <<-String, #{...} and large loops — nobu.nokada@... 2002/05/27

Hi,

[#50] Re: possible bug: stack dump with <<-String, #{...} and large loops — ts <decoux@...> 2002/05/27

>>>>> "n" == nobu nokada <nobu.nokada@softhome.net> writes:

[#51] Re: possible bug: stack dump with <<-String, #{...} and large loops — nobu.nokada@... 2002/05/27

Hi,

[#52] Re: possible bug: stack dump with <<-String, #{...} and large loops — ts <decoux@...> 2002/05/27

>>>>> "n" == nobu nokada <nobu.nokada@softhome.net> writes:

[#53] Re: possible bug: stack dump with <<-String, #{...} and large loops — nobu.nokada@... 2002/05/27

Hi,

[#54] Re: possible bug: stack dump with <<-String, #{...} and large loops — ts <decoux@...> 2002/05/27

>>>>> "n" == nobu nokada <nobu.nokada@softhome.net> writes:

[#55] Re: possible bug: stack dump with <<-String, #{...} and large loops — nobu.nokada@... 2002/05/27

Hi,

[#56] Re: possible bug: stack dump with <<-String, #{...} and large loops — ts <decoux@...> 2002/05/27

>>>>> "n" == nobu nokada <nobu.nokada@softhome.net> writes:

[#57] Re: possible bug: stack dump with <<-String, #{...} and large loops — nobu.nokada@... 2002/05/28

Hi,

[#65] Re: possible bug: stack dump with <<-String, #{...} and large loops — ts <decoux@...> 2002/05/28

>>>>> "n" == nobu nokada <nobu.nokada@softhome.net> writes:

[#84] Re: possible bug: stack dump with <<-String, #{...} and large loops — nobu.nokada@... 2002/05/29

Hi,

[#92] Re: possible bug: stack dump with <<-String, #{...} and large loops — ts <decoux@...> 2002/05/29

>>>>> "n" == nobu nokada <nobu.nokada@softhome.net> writes:

[#67] The warns-a-thon continues... — Sean Chittenden <sean@...>

I'm feeling left out in this race to clobber warnings!!! Attached are

19 messages 2002/05/28

[#104] Re: possible bug: stack dump with <<-String, #{...} and large loops — ts <decoux@...>

>>>>> "n" == nobu nokada <nobu.nokada@softhome.net> writes:

29 messages 2002/05/30
[#105] Re: possible bug: stack dump with <<-String, #{...} and large loops — nobu.nokada@... 2002/05/30

Hi,

[#125] Re: possible bug: stack dump with <<-String, #{...} and large loops — ts <decoux@...> 2002/06/04

>>>>> "n" == nobu nokada <nobu.nokada@softhome.net> writes:

[#126] Re: possible bug: stack dump with <<-String, #{...} and large loops — nobu.nokada@... 2002/06/04

Hi,

[#127] Re: possible bug: stack dump with <<-String, #{...} and large loops — ts <decoux@...> 2002/06/04

>>>>> "n" == nobu nokada <nobu.nokada@softhome.net> writes:

[#130] Re: possible bug: stack dump with <<-String, #{...} and large loops — nobu.nokada@... 2002/06/04

Hi,

[#132] Re: possible bug: stack dump with <<-String, #{...} and large loops — nobu.nokada@... 2002/06/05

Hi,

[#134] Re: possible bug: stack dump with <<-String, #{...} and large loops — ts <decoux@...> 2002/06/05

>>>>> "n" == nobu nokada <nobu.nokada@softhome.net> writes:

Ruby obsolete

From: Michal Rokos <m.rokos@...>
Date: 2002-05-22 21:55:41 UTC
List: ruby-core #31
Hello again,

	how about disable obsolete/deprecated things in Ruby. It could
	be good for ext. makers, and who know who else...

	What do you think about?

		Michal


PS: Something like:
(Question: Why is rb_f_getc marked as obsolete and not others?)

Index: array.c
===================================================================
RCS file: /src/ruby/array.c,v
retrieving revision 1.83
diff -u -r1.83 array.c
--- array.c	2002/05/22 05:57:08	1.83
+++ array.c	2002/05/22 11:34:06
@@ -598,6 +598,7 @@
     return Qnil;
 }
 
+#if !defined(RUBY_NO_OBSOLETE)
 static VALUE
 rb_ary_indexes(argc, argv, ary)
     int argc;
@@ -616,6 +617,7 @@
 
     return new_ary;
 }
+#endif
 
 VALUE
 rb_ary_to_ary(obj)
@@ -1871,8 +1873,10 @@
     rb_define_method(rb_cArray, "empty?", rb_ary_empty_p, 0);
     rb_define_method(rb_cArray, "index", rb_ary_index, 1);
     rb_define_method(rb_cArray, "rindex", rb_ary_rindex, 1);
+#if !defined(RUBY_NO_OBSOLETE)
     rb_define_method(rb_cArray, "indexes", rb_ary_indexes, -1);
     rb_define_method(rb_cArray, "indices", rb_ary_indexes, -1);
+#endif
     rb_define_method(rb_cArray, "clone", rb_ary_clone, 0);
     rb_define_method(rb_cArray, "dup", rb_ary_dup, 0);
     rb_define_method(rb_cArray, "join", rb_ary_join_m, -1);
Index: gc.c
===================================================================
RCS file: /src/ruby/gc.c,v
retrieving revision 1.94
diff -u -r1.94 gc.c
--- gc.c	2002/05/14 06:22:26	1.94
+++ gc.c	2002/05/22 11:34:08
@@ -1326,6 +1326,7 @@
 
 static VALUE finalizers;
 
+#if !defined(RUBY_NO_OBSOLETE)
 static VALUE
 add_final(os, proc)
     VALUE os, proc;
@@ -1364,6 +1365,7 @@
     FL_SET(obj, FL_FINALIZE);
     return obj;
 }
+#endif
 
 static VALUE
 undefine_final(os, obj)
@@ -1520,11 +1522,12 @@
     rb_mObSpace = rb_define_module("ObjectSpace");
     rb_define_module_function(rb_mObSpace, "each_object", os_each_obj, -1);
     rb_define_module_function(rb_mObSpace, "garbage_collect", rb_gc_start, 0);
+#if !defined(RUBY_NO_OBSOLETE)
     rb_define_module_function(rb_mObSpace, "add_finalizer", add_final, 1);
     rb_define_module_function(rb_mObSpace, "remove_finalizer", rm_final, 1);
     rb_define_module_function(rb_mObSpace, "finalizers", finals, 0);
     rb_define_module_function(rb_mObSpace, "call_finalizer", call_final, 1);
-
+#endif
     rb_define_module_function(rb_mObSpace, "define_finalizer", define_final, -1);
     rb_define_module_function(rb_mObSpace, "undefine_finalizer", undefine_final, 1);
 
Index: hash.c
===================================================================
RCS file: /src/ruby/hash.c,v
retrieving revision 1.67
diff -u -r1.67 hash.c
--- hash.c	2002/05/21 05:39:18	1.67
+++ hash.c	2002/05/22 11:34:10
@@ -390,6 +390,7 @@
     return args[1];
 }
 
+#if !defined(RUBY_NO_OBSOLETE)
 static VALUE
 rb_hash_indexes(argc, argv, hash)
     int argc;
@@ -408,6 +409,7 @@
     }
     return indexes;
 }
+#endif
 
 VALUE
 rb_hash_delete(hash, key)
@@ -1505,6 +1507,7 @@
     return Qnil;
 }
 
+#if !defined(RUBY_NO_OBSOLETE)
 static VALUE
 env_indexes(argc, argv)
     int argc;
@@ -1531,6 +1534,7 @@
 
     return indexes;
 }
+#endif
 
 static VALUE
 env_to_hash()
@@ -1588,8 +1592,10 @@
     rb_define_method(rb_cHash,"default", rb_hash_default, -1);
     rb_define_method(rb_cHash,"default=", rb_hash_set_default, 1);
     rb_define_method(rb_cHash,"index", rb_hash_index, 1);
+#if !defined(RUBY_NO_OBSOLETE)
     rb_define_method(rb_cHash,"indexes", rb_hash_indexes, -1);
     rb_define_method(rb_cHash,"indices", rb_hash_indexes, -1);
+#endif
     rb_define_method(rb_cHash,"size", rb_hash_size, 0);
     rb_define_method(rb_cHash,"length", rb_hash_size, 0);
     rb_define_method(rb_cHash,"empty?", rb_hash_empty_p, 0);
@@ -1644,8 +1650,10 @@
     rb_define_singleton_method(envtbl,"rehash", env_none, 0);
     rb_define_singleton_method(envtbl,"to_a", env_to_a, 0);
     rb_define_singleton_method(envtbl,"index", env_index, 1);
+#if !defined(RUBY_NO_OBSOLETE)
     rb_define_singleton_method(envtbl,"indexes", env_indexes, -1);
     rb_define_singleton_method(envtbl,"indices", env_indexes, -1);
+#endif
     rb_define_singleton_method(envtbl,"size", env_size, 0);
     rb_define_singleton_method(envtbl,"length", env_size, 0);
     rb_define_singleton_method(envtbl,"empty?", env_empty_p, 0);
Index: io.c
===================================================================
RCS file: /src/ruby/io.c,v
retrieving revision 1.138
diff -u -r1.138 io.c
--- io.c	2002/05/20 04:33:59	1.138
+++ io.c	2002/05/22 11:34:13
@@ -2878,12 +2878,14 @@
     return line;
 }
 
+#if !defined(RUBY_NO_OBSOLETE)
 static VALUE
 rb_f_getc()
 {
     rb_warn("getc is obsolete; use STDIN.getc instead");
     return rb_io_getc(rb_stdin);
 }
+#endif
 
 static VALUE
 rb_f_readlines(argc, argv)
@@ -3690,7 +3692,9 @@
     rb_define_global_function("puts", rb_f_puts, -1);
     rb_define_global_function("gets", rb_f_gets, -1);
     rb_define_global_function("readline", rb_f_readline, -1);
+#if !defined(RUBY_NO_OBSOLETE)
     rb_define_global_function("getc", rb_f_getc, 0);
+#endif
     rb_define_global_function("select", rb_f_select, -1);
 
     rb_define_global_function("readlines", rb_f_readlines, -1);
Index: object.c
===================================================================
RCS file: /src/ruby/object.c,v
retrieving revision 1.79
diff -u -r1.79 object.c
--- object.c	2002/05/21 05:39:19	1.79
+++ object.c	2002/05/22 11:34:14
@@ -1110,6 +1110,7 @@
     return RFLOAT(rb_Float(val))->value;
 }
 
+#if !defined(RUBY_NO_OBSOLETE)
 char*
 rb_str2cstr(str, len)
     VALUE str;
@@ -1122,6 +1123,7 @@
     }
     return RSTRING(str)->ptr;
 }
+#endif
 
 VALUE
 rb_String(val)
Index: ruby.h
===================================================================
RCS file: /src/ruby/ruby.h,v
retrieving revision 1.66
diff -u -r1.66 ruby.h
--- ruby.h	2002/05/14 06:22:26	1.66
+++ ruby.h	2002/05/22 11:34:15
@@ -219,8 +219,11 @@
     rb_check_safe_str(v);\
 } while (0)
 #define StringValuePtr(v) RSTRING((TYPE(v) == T_STRING) ? (v) : rb_string_value(&(v)))->ptr
+
+#if !defined(RUBY_NO_OBSOLETE)
 /* obsolete macro - use SafeStringValue(v) */
-#define Check_SafeStr(v) rb_check_safe_str((VALUE)(v))
+# define Check_SafeStr(v) rb_check_safe_str((VALUE)(v))
+#endif
 
 void rb_secure _((int));
 EXTERN int ruby_safe_level;
@@ -260,10 +263,12 @@
 double rb_num2dbl _((VALUE));
 #define NUM2DBL(x) rb_num2dbl((VALUE)(x))
 
+#if !defined(RUBY_NO_OBSOLETE)
 /* obsolete API - use StringValue() */
 char *rb_str2cstr _((VALUE,int*));
 /* obsolete API - use StringValuePtr() */
-#define STR2CSTR(x) rb_str2cstr((VALUE)(x),0)
+# define STR2CSTR(x) rb_str2cstr((VALUE)(x),0)
+#endif
 
 #define NUM2CHR(x) (((TYPE(x) == T_STRING)&&(RSTRING(x)->len>=1))?\
                      RSTRING(x)->ptr[0]:(char)(NUM2INT(x)&0xff))
Index: time.c
===================================================================
RCS file: /src/ruby/time.c,v
retrieving revision 1.57
diff -u -r1.57 time.c
--- time.c	2002/04/24 04:54:14	1.57
+++ time.c	2002/05/22 11:34:16
@@ -1320,6 +1320,7 @@
     return str;
 }
 
+#if !defined(RUBY_NO_OBSOLETE)
 static VALUE
 time_s_times(obj)
     VALUE obj;
@@ -1327,6 +1328,7 @@
     rb_warn("obsolete method Time::times; use Process::times");
     return rb_proc_times(obj);
 }
+#endif
 
 static VALUE
 time_dump(argc, argv, time)
@@ -1428,7 +1430,9 @@
     rb_define_singleton_method(rb_cTime, "local", time_s_mktime, -1);
     rb_define_singleton_method(rb_cTime, "mktime", time_s_mktime, -1);
 
+#if !defined(RUBY_NO_OBSOLETE)
     rb_define_singleton_method(rb_cTime, "times", time_s_times, 0);
+#endif
 
     rb_define_method(rb_cTime, "to_i", time_to_i, 0);
     rb_define_method(rb_cTime, "to_f", time_to_f, 0);
Index: version.c
===================================================================
RCS file: /src/ruby/version.c,v
retrieving revision 1.7
diff -u -r1.7 version.c
--- version.c	2002/01/11 09:18:50	1.7
+++ version.c	2002/05/22 11:34:16
@@ -21,14 +21,23 @@
     VALUE d = rb_obj_freeze(rb_str_new2(RUBY_RELEASE_DATE));
     VALUE p = rb_obj_freeze(rb_str_new2(RUBY_PLATFORM));
 
+#if !defined(RUBY_NO_OBSOLETE)
+    /* obsolete constants */
+    VALUE ov = rb_obj_freeze(rb_str_new2(RUBY_VERSION " (Constant VERSION is obsolete)"));
+    VALUE od = rb_obj_freeze(rb_str_new2(RUBY_RELEASE_DATE " (Constant RELEASE_DATE is obsolete)"));
+    VALUE op = rb_obj_freeze(rb_str_new2(RUBY_PLATFORM " (Constant PLATFORM is obsolete)"));
+#endif
+
     rb_define_global_const("RUBY_VERSION", v);
     rb_define_global_const("RUBY_RELEASE_DATE", d);
     rb_define_global_const("RUBY_PLATFORM", p);
 
+#if !defined(RUBY_NO_OBSOLETE)
     /* obsolete constants */
-    rb_define_global_const("VERSION", v);
-    rb_define_global_const("RELEASE_DATE", d);
-    rb_define_global_const("PLATFORM", p);
+    rb_define_global_const("VERSION", ov);
+    rb_define_global_const("RELEASE_DATE", od);
+    rb_define_global_const("PLATFORM", op);
+#endif
 }
 
 void

-- 
-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
Michal Rokos                         Czech Technical University, Prague
E-mail:m.rokos@sh.cvut.cz  ICQ:36118339  Jabber:majkl@jabber.sh.cvut.cz
-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-

In This Thread

Prev Next