[#34011] Should --verbose be equal to -v ? — Yugui <yugui@...>

Yuguiです。

15 messages 2008/03/10
[#34012] Re: Should --verbose be equal to -v ? — Yukihiro Matsumoto <matz@...> 2008/03/10

まつもと ゆきひろです

[#34105] rational.rb, complex.rb and mathn.rb — Tadayoshi Funaba <tadf@...>

rational と complex が組み込みになったことで、lib/mathn.rb の意義は薄

29 messages 2008/03/22
[#34106] Re: rational.rb, complex.rb and mathn.rb — Tadayoshi Funaba <tadf@...> 2008/03/22

現時点で rational.rb と complex.rb を残しているのは、それが無難だから

[#34107] Re: rational.rb, complex.rb and mathn.rb — Tadayoshi Funaba <tadf@...> 2008/03/22

で、かなり選択肢を絞った叩き台です。

[#34120] Re: rational.rb, complex.rb and mathn.rb — keiju@... (石塚圭樹) 2008/03/24

けいじゅ@いしつかです.

[#34125] Re: rational.rb, complex.rb and mathn.rb — Shin-ichiro HARA <sinara@...> 2008/03/25

原です。

[#34130] Re: rational.rb, complex.rb and mathn.rb — Tadayoshi Funaba <tadf@...> 2008/03/25

> 私も Complex の組み込みは Rational とは比較にならないくらい、仕様が決め

[#34158] Complex組み込み — Masahiro TANAKA <masa16.tanaka@...>

Complexが組み込みになるそうですが、これはcomplex.rbを踏襲して、

49 messages 2008/03/27
[#34161] Re: Complex組み込み — Shin-ichiro HARA <sinara@...> 2008/03/28

原です。

[#34168] Re: Complex組み込み — Tadayoshi Funaba <tadf@...> 2008/03/28

> 今までの Complex は、complex.rb にほぼ残して、たとえば Rational 成分

[#34186] Re: Complex組み込み — Shin-ichiro HARA <sinara@...> 2008/03/31

原です。

[#34187] Re: Complex組み込み — Tadayoshi Funaba <tadf@...> 2008/03/31

> そうです。Complex が難しい、という話を書いておくと、

[#34193] Re: Complex組み込み — Yukihiro Matsumoto <matz@...> 2008/03/31

まつもと ゆきひろです

[#34203] Re: Complex組み込み — Tadayoshi Funaba <tadf@...> 2008/04/01

> |僕としては、/ 演算子の振舞いについて前向きに検討してほしいです。

[#34215] Re: Complex組み込み — Yukihiro Matsumoto <matz@...> 2008/04/02

まつもと ゆきひろです

[#34166] Re: Complex組み込み — Tadayoshi Funaba <tadf@...> 2008/03/28

> となるようですが、別の実装として、

[ruby-dev:33959] Re: --encoding affects script encoding

From: Nobuyoshi Nakada <nobu@...>
Date: 2008-03-02 15:21:28 UTC
List: ruby-dev #33959
なかだです。

At Sun, 2 Mar 2008 00:31:01 +0900,
sheepman wrote in [ruby-dev:33955]:
> shebang を検査する前に一旦 IO エンコーディングを セットしておくべき
> なんだと思います。

コミットしましたが、IO#ungetcでのエンコーディングの扱いが抜けて
いることに気づきました。


Index: io.c
===================================================================
--- io.c	(revision 15671)
+++ io.c	(working copy)
@@ -2430,4 +2430,5 @@ VALUE
 rb_io_ungetc(VALUE io, VALUE c)
 {
+    rb_encoding *enc;
     rb_io_t *fptr;
 
@@ -2437,11 +2438,15 @@ rb_io_ungetc(VALUE io, VALUE c)
     if (FIXNUM_P(c)) {
 	int cc = FIX2INT(c);
-	rb_encoding *enc = io_read_encoding(fptr);
 	char buf[16];
 
-	c = rb_str_new(buf, rb_enc_mbcput(cc, buf, enc));
+	c = rb_str_new(buf, rb_enc_mbcput(cc, buf, io_read_encoding(fptr)));
+	enc = fptr->enc2;
     }
     else {
 	SafeStringValue(c);
+	enc = io_input_encoding(fptr);
+    }
+    if (enc && enc != rb_enc_get(c)) {
+	c = rb_funcall(c, id_encode, 1, rb_enc_from_encoding(enc));
     }
     io_ungetc(c, fptr);


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

In This Thread