[#20392] [BigDecimal] proposal to change specification — "Tadashi Saito" <shiba@...2.accsnet.ne.jp>

斎藤と申します。

25 messages 2003/06/20
[#20407] Re: [BigDecimal] proposal to change specification — "Shigeo Kobayashi" <shigeo@...> 2003/06/22

小林です。

[#20447] [BigDecimal] renaming proposal — "Tadashi Saito" <shiba@...2.accsnet.ne.jp>

斎藤です。

47 messages 2003/06/24
[#20621] Re: [BigDecimal] renaming proposal — "Shigeo Kobayashi" <shigeo@...> 2003/07/11

小林@MAILチェック中です。

[#20628] Re: [BigDecimal] renaming proposal — "Shigeo Kobayashi" <shigeo@...> 2003/07/11

小林です。

[ruby-dev:20414] Re: In 1.8.0 nil.to_s is not the same as ""

From: nobu.nakada@...
Date: 2003-06-23 07:57:44 UTC
List: ruby-dev #20414
なかだです。

At Mon, 23 Jun 2003 15:53:54 +0900,
Yukihiro Matsumoto wrote:
> |作り直しました。関係なくなってるので、スレッド切ってついでに(説
> |明がめんどくさいので)devへ。
> 
> 一部はすでに当てていたのでコミットします。たぶん足りないもの
> があると思うので追加してください。

rb_string_value()では常にrb_str_to_str()を呼ぶようになってます
が、rb_string_value_ptr()と同様T_STRINGでないときだけでいいんじゃ
ないでしょうか。そうすると二つはほとんど同じですが。

あと[ruby-dev:20412]の残りはこれだけ、かな。

* dir.c (find_dirsep): get rid of warnings.
* eval.c (error_print): temporary value might be disposed by GC.
* hash.c (env_has_value, env_index): should not increment NULL.
* io.c (io_read, rb_io_sysread): not read when length is 0.
* io.c (rb_io_reopen): ensure initialized IO.
* io.c (rb_io_init_copy): sychronize file pointer.
* io.c (rb_io_s_pipe): make exception proof.
* string.c (rb_str_rindex_m): Fixnum 0 matched end of string.


Index: string.c
===================================================================
RCS file: /cvs/ruby/src/ruby/string.c,v
retrieving revision 1.157
diff -u -2 -p -r1.157 string.c
--- string.c	23 Jun 2003 06:52:39 -0000	1.157
+++ string.c	23 Jun 2003 07:49:31 -0000
@@ -452,16 +452,4 @@ rb_string_value(ptr)
     volatile VALUE *ptr;
 {
-    *ptr = rb_str_to_str(*ptr);
-    if (!RSTRING(*ptr)->ptr) {
-	FL_SET(*ptr, ELTS_SHARED);
-	RSTRING(*ptr)->ptr = null_str;
-    }
-    return *ptr;
-}
-
-char *
-rb_string_value_ptr(ptr)
-    volatile VALUE *ptr;
-{
     VALUE s = *ptr;
     if (TYPE(s) != T_STRING) {
@@ -473,5 +461,12 @@ rb_string_value_ptr(ptr)
 	RSTRING(s)->ptr = null_str;
     }
-    return RSTRING(s)->ptr;
+    return s;
+}
+
+char *
+rb_string_value_ptr(ptr)
+    volatile VALUE *ptr;
+{
+    return RSTRING(rb_string_value(s))->ptr;
 }
 


-- 
--- 僕の前にBugはない。
--- 僕の後ろにBugはできる。
    中田 伸悦

In This Thread