[#42564] [Ruby 1.9-Feature#4043][Open] グローバル関数current_classの提案 — Makoto Kishimoto <redmine@...>

Feature #4043: グローバル関数current_classの提案

15 messages 2010/11/11
[#42774] Re: [Ruby 1.9-Feature#4043][Open] グローバル関数current_classの提案 — Yukihiro Matsumoto <matz@...> 2010/12/16

まつもと ゆきひろです

[#42834] Re: [Ruby 1.9-Feature#4043][Open] グローバル関数current_classの提案 — "KISHIMOTO, Makoto" <ksmakoto@...4u.or.jp> 2010/12/21

きしもとです

[#42835] Re: [Ruby 1.9-Feature#4043][Open] グローバル関数current_classの提案 — Yukihiro Matsumoto <matz@...> 2010/12/21

まつもと ゆきひろです

[#42838] Re: [Ruby 1.9-Feature#4043][Open] グローバル関数current_classの提案 — "KISHIMOTO, Makoto" <ksmakoto@...4u.or.jp> 2010/12/21

きしもとです

[#42845] Re: [Ruby 1.9-Feature#4043][Open] グローバル関数current_classの提案 — Yukihiro Matsumoto <matz@...> 2010/12/21

まつもと ゆきひろです

[#42577] Rubyのバグレポートのガイドライン — "Shota Fukumori (sora_h)" <sorah@...>

sora_hです。

11 messages 2010/11/15
[#42588] Re: Rubyのバグレポートのガイドライン — Yugui <yugui@...> 2010/11/18

2010/11/15 Shota Fukumori (sora_h) <sorah@tubusu.net>:

[#42638] Enumerable#categorize — Tanaka Akira <akr@...>

enumerable から hash を生成するメソッドとして

25 messages 2010/11/27
[#42643] Re: Enumerable#categorize — Yukihiro Matsumoto <matz@...> 2010/11/27

まつもと ゆきひろです

[ruby-dev:42510] Re: [Ruby 1.9-Bug#3990][Closed] tests of rexml/rss reports many errors and failures without iconv

From: "NARUSE, Yui" <naruse@...>
Date: 2010-11-01 18:15:40 UTC
List: ruby-dev #42510
成瀬です。

(2010/10/30 21:17), Kouhei Sutou wrote:
> チケット #3990 が更新されました。 (by Kouhei Sutou)
> This issue was solved with changeset r29646.
>
> Author: kou <kou@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>
> Date:   Sat Oct 30 12:10:56 2010 +0000
> 
>     * lib/rexml/encoding.rb: use Ruby native encoding mechnism.  [ruby-dev:42464]
>     * lib/rexml/encodings/: remove.
> 
>     * lib/rexml/document.rb, lib/rexml/formatters/default.rb,
>       lib/rexml/output.rb, lib/rexml/parseexception.rb,
>       lib/rexml/parsers/baseparser.rb, lib/rexml/source.rb,
>       lib/rexml/xmldecl.rb: use Ruby's native Encoding object.
> 
>     * test/rexml/, test/rss/: follow the above encoding chagnes.
> 
>     * NEWS: add REXML's incompatible change about encoding.

この変更では、Ruby M17N の encoding system を使うようにしていますが、
導入した非互換変更には反対です。

総論として、REXML は Ruby 的に非推奨という扱いになりつつあるというのは
合意がとれていると思われるところ、この状況下で非互換変更をするのは
避けるべきだと思います。

また、今回の REXML::Document#encoding, REXML::XMLdecl#encoding,
REXML::Output#encoding and REXML::Source#encoding は、
ドキュメントが自称しているエンコーディングと、Ruby が解釈し使っている
エンコーディングは分離するべきでしょう。
直近では UTF-16BE/UTF-16LE は BOM なしを意味するので、
BOM 付きの UTF-16 が欲しいときに困ります。
(なお、UTF-16 は ASCII incompatible なので色々バグってる気がする)

というわけで、encoding メソッドは以前のままにして、Encoding オブジェクトを
返すメソッドを新設した方がよいのではないかと思います。

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

In This Thread