-
-
Notifications
You must be signed in to change notification settings - Fork 571
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Gem depends on #inspect producing valid Ruby code #972
Comments
@ngollan do you have a sample of this override? Or, a gem that does this? |
Having the attached code somewhere before Haml template compilation would reproduce this. It's my fault on Haml 5. TrueClass.class_eval do
def inspect
"⊤"
end
end
FalseClass.class_eval do
def inspect
"⊥"
end
end |
I had not expected this "issue" to get fixed ;-) Anyway, the test in the referenced commit overrides |
Good eye! Fixed it b564537 |
https://build.opensuse.org/request/show/865194 by user coolo + dimstar_suse updated to version 5.2.1 see installed CHANGELOG.md ## 5.2.1 Released on November 30, 2020 ([diff](haml/haml@v5.2.0...v5.2.1)). * Add in improved "multiline" support for attributes [#1043](haml/haml#1043) ## 5.2 Released on September 28, 2020 ([diff](haml/haml@v5.1.2...v5.2.0)). * Fix crash in the attribute optimizer when `#inspect` is overridden in TrueClass / FalseClass [#972](haml/haml#972) * Do not HTML-escape templates that are declared to be plaintext [#1014](haml/haml#1014) (Thanks [@cesarizu](https://github.com/cesarizu)) * Class names are no longer ordered alphabetically, and now follow a new specification as laid ou
Trying to produce shorter/prettier (no accounting for taste) inspect output and overriding
TrueClass/FalseClass#inspect
breaks "optimisation" with something like:in
Haml::AttributeCompiler#static_build
.I have true/false represented by "⊤" and "⊥" via
The text was updated successfully, but these errors were encountered: