From: Tanaka Akira Date: 2003-07-25T11:48:56+09:00 Subject: [ruby-dev:20885] third argument for Regexp.new % ruby -e 'Regexp.new("", 0, nil)' -e:1:in `initialize': cannot convert nil into String (TypeError) from -e:1:in `new' from -e:1 というように、Regexp.new の第3引数に nil を渡すとエラーになるため、 % ruby -e 'r = // Regexp.new(r.source, r.options, r.kcode)' -e:2:in `initialize': cannot convert nil into String (TypeError) from -e:2:in `new' from -e:2 というように Regexp を再生成するのに失敗するのですが、意図的でしょうか? また、 % ruby -e ' r = /a/e p Regexp.new(r.source, r.options, r.kcode) p [r.source, r.options, r.kcode] ' /a/ ["a", 128, "euc"] というように、"euc" を渡したはずが反映されないというのもあるのですが、 意図的でしょうか? -- [田中 哲][たなか あきら][Tanaka Akira]