Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Change in behavior of rendering an element with a css style class with a nested class array in 6.2.0 #1189

@sterlzbd

Description

@sterlzbd

in 6.1.4:

$ irb -rhaml
irb(main):001> Haml::VERSION
=> "6.1.4"
irb(main):002> Haml::Template.new { <<~EOS }.render
  %p.css{ class: [%w[a b]] }
EOS
=> "<p class='css a b'></p>\n"

in 6.2.0:

$ irb -rhaml
irb(main):001> Haml::VERSION
=> "6.2.0"
irb(main):002> Haml::Template.new { <<~EOS }.render
  %p.css{ class: [%w[a b]] }
EOS
=> "<p class='css [&quot;a&quot;, &quot;b&quot;]'></p>\n"

ruby version

$ ruby --version
ruby 3.4.5 (2025-07-16 revision 20cda200d3) +PRISM [aarch64-linux]

Seeing as 6.2.0 removed the C extension without touching much else it seems like before that version change, jruby and cruby might have had different behavior.

I'm wondering if this change for cruby was intended or if it's a bug. Another comment also pointed this out but that was on a closed issue that never had a response from the maintainers: #1151 (comment)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions