Actions
Bug #8301
closedREXML::Attributes#to_a
Description
添付したコード(attributs_to_a.rb)を実行すると、REXML::Attributes#to_a という名前から期待される結果は
[foo:att='1', bar:att='2', att='<', baz='4']
だと思うのですが、実際には
[{"foo"=>foo:att='1', "bar"=>bar:att='2', ""=>att='<'}, baz='4']
という結果になります。これは意図した結果ではないと思うのですがどうでしょうか。
添付したパッチで上の「期待される結果」になります。
Files
Updated by hsbt (Hiroshi SHIBATA) about 12 years ago
- Assignee set to kou (Kouhei Sutou)
Updated by kou (Kouhei Sutou) about 12 years ago
- Status changed from Open to Closed
- % Done changed from 0 to 100
This issue was solved with changeset r40482.
Ippei, thank you for reporting this issue.
Your contribution to Ruby is greatly appreciated.
May Ruby be with you.
- lib/rexml/element.rb (REXML::Attributes#to_a): Support
namespaced attributes. [ruby-dev:47277] [Bug #8301]
Patch by Ippei Obayashi. Thanks!!! - test/rexml/test_attributes.rb
(AttributesTester#test_to_a_with_namespaces): Add a test of the
above change.
Updated by kou (Kouhei Sutou) about 12 years ago
テストを追加して取り込みました!
Actions
Like0
Like0Like0Like0