[#35789] [Ruby 1.9 - Bug #407] (Open) String#<< — Shyouhei Urabe <redmine@...>

チケット #407 が報告されました。 (by Shyouhei Urabe)

13 messages 2008/08/06

[#35845] [Bug #437] test_strftime(TestTime) fails on Solaris — Shugo Maeda <redmine@...>

Bug #437: test_strftime(TestTime) fails on Solaris

24 messages 2008/08/13
[#35855] Re: [Bug #437] test_strftime(TestTime) fails on Solaris — "Shugo Maeda" <shugo@...> 2008/08/15

前田です。

[#35856] Re: [Bug #437] test_strftime(TestTime) fails on Solaris — SATOH Fumiyasu <fumiyas@...> 2008/08/15

さとうふみやす @ OSS テクノロジです。

[#35857] Re: [Bug #437] test_strftime(TestTime) fails on Solaris — Yukihiro Matsumoto <matz@...> 2008/08/15

まつもと ゆきひろです

[#35870] Re: [Bug #437] test_strftime(TestTime) fails on Solaris — "Shugo Maeda" <shugo@...> 2008/08/18

前田です。

[#35863] Refactoring of enumerating prime numbers — "Yugui (Yuki Sonoda)" <yugui@...>

Yuguiです。

20 messages 2008/08/16
[#35865] Re: Refactoring of enumerating prime numbers — keiju@... (keiju ISHITSUKA) 2008/08/17

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

[#35867] Re: Refactoring of enumerating prime numbers — "Yugui (Yuki Sonoda)" <yugui@...> 2008/08/17

Yuguiです。

[#35875] Re: Refactoring of enumerating prime numbers — keiju@... (keiju ISHITSUKA) 2008/08/19

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

[#35877] Re: Refactoring of enumerating prime numbers — Nobuyoshi Nakada <nobu@...> 2008/08/19

なかだです。

[#35882] Re: Refactoring of enumerating prime numbers — keiju@... (石塚圭樹) 2008/08/20

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

[#35904] [Feature:1.9] pack format 'm' based on RFC 4648 — "Yusuke ENDOH" <mame@...>

遠藤です。

14 messages 2008/08/21
[#36442] [Feature #471] pack format 'm' based on RFC 4648 — Yuki Sonoda <redmine@...> 2008/09/22

チケット #471 が更新されました。 (by Yuki Sonoda)

[#35906] %N for Time#strftime — "Shugo Maeda" <shugo@...>

前田です。

13 messages 2008/08/21

[#35986] 1.9と1.8で、delegateのインスタンスのクラス名の違う — Fujioka <fuj@...>

xibbarこと藤岡です。

17 messages 2008/08/26
[#35987] Re: 1.9と1.8で、delegateのインスタンスのクラス名の違う — Yukihiro Matsumoto <matz@...> 2008/08/26

まつもと ゆきひろです

[#35991] Re: 1.9と1.8で、delegateのインスタンスのクラス名の違う — keiju@... (石塚圭樹) 2008/08/26

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

[#35994] Re: 1.9と1.8で、delegateのインスタンスのクラス名の違う — Fujioka <fuj@...> 2008/08/27

藤岡です。

[#35998] Re: 1.9と1.8で、delegateのインスタンスのクラス名の違う — keiju@... (石塚圭樹) 2008/08/27

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

[#36066] Numeric#scalar? — Tadayoshi Funaba <tadf@...>

1.9 の Numeric#scalar? について、適当でないのでは (real? などのほうがい

24 messages 2008/08/31
[#36069] Re: Numeric#scalar? — Shin-ichiro HARA <sinara@...> 2008/08/31

原です。

[#36104] Re: Numeric#scalar? — Tadayoshi Funaba <tadf@...> 2008/09/02

> やはり、scalar? はずれているんじゃないかな。real? の方がいい

[#36122] Re: Numeric#scalar? — Shin-ichiro HARA <sinara@...> 2008/09/03

原です。

[#36133] Re: Numeric#scalar? — Tadayoshi Funaba <tadf@...> 2008/09/03

> ここで、scalar? を疑問視する理由を復習すると、たとえば、「複

[#36173] Re: Numeric#scalar? — Tadayoshi Funaba <tadf@...> 2008/09/05

1.9.1 までに時間がないので scalar? だけ何とかしたいと思っていましたが、

[#36183] Re: Numeric#scalar? — "Shugo Maeda" <shugo@...> 2008/09/06

前田です。

[#36186] Re: Numeric#scalar? — Shin-ichiro HARA <sinara@...> 2008/09/06

原です。

[ruby-dev:36049] Re: TypeError from Encoding.compatible? (r18920)

From: "NARUSE, Yui" <naruse@...>
Date: 2008-08-29 23:16:21 UTC
List: ruby-dev #36049
成瀬です。

Yukihiro Matsumoto wrote:
> まつもと ゆきひろです
> 
> r18920でEncoding.compatible?がTypeErrorをあげるようになりま
> したが、これが引数チェックなしにBUILTIN_TYPE()を使っているた
> め、test_m17n.rbが落ちます。

> もし、例外をあげるべきだと言うのであれば、BUILTIN_TYPE()では
> なく、TYPE()を使うべきでしょう。

この 2 つはとりあえず修正しました。

> 今までのようにそもそもencodingの対象
> ではない時nil、compatibleでない時false、compatibleな時trueの
> 方が良いように思います。

そのような仕様は初耳です。

 * call-seq:
 *   Encoding.compatible?(str1, str2) => enc or nil
 *
 * Checks the compatibility of two strings.
 * If they are compatible, means concatenatable,
 * returns an encoding which the concatinated string will be.
 * If they are not compatible, nil is returned.
encoding.c の rdoc より

r18920 以前では以下の通りでした。
* encodingの対象ではない時 nil
* compatible でない時も nil
* compatible な時はどこにおいて compatible かに応じて enc
  # Encoding.compatible?("\u3042", "hoge") #=> Encoding::UTF_8
  # 等の結果が欲しいので enc である必要がある
  # 言い換えれば、2 つの str を結合した時の encoding が返る

そして、r18920 で、
* encodingの対象ではない時 TypeError
* compatible でない時も nil
* compatible な時は enc

> ですが、そもそもcompatible?が例外をあげる必要があるのでしょ
> うか。コンパチかどうかチェックしたいだけなのに例外が上がるの
> は使いにくい気がします。

もともと、Encoding.compatible? の引数に encoding を与えると
期待したとおりに動作しないというのがありまして、
> Encoding.compatible?(Encoding::UTF_8, Encoding::US_ASCII)
=> #<Encoding:ASCII-8BIT>
# rb_enc_get_index() は encoding を対象としないため

このような誤解を招く動作をするよりは、
潔く例外を出してくれた方がいいと考えました。
# Encoding.compatible? が encoding を取れるようにするべき、
# という案については現在思案中


まつもとさんの仰る仕様ならば一貫性があるのでよいと思うのですが、
現行の仕様では compatible な時に enc を返す以上、
false と nil で区別という方法が使いづらいのがネックでしょうか。
enc / false / nil でもいいのかなぁ・・・。

r18920 の意図は Encoding.compatible? が対応しているオブジェクトと、
対応していないオブジェクトをはっきりわけることだったので、
例外を出すことにこだわりはないのですが・・・。

-- 
NARUSE, Yui  <naruse@airemix.jp>

In This Thread