Skip to content
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

un-freeze TempleEngine precompiled string literals #983

Merged
merged 1 commit into from Mar 10, 2018

Conversation

wjordan
Copy link
Contributor

@wjordan wjordan commented Mar 1, 2018

Fixes #982.
This PR maintains public-API compatibility in Haml::TempleEngine#precompiled_with_return_value and precompiled_with_ambles, returning mutable strings as expected by tilt's Haml template implementation (which calls #force_encoding on the result).

Maintain backwards-compatibility in public API.
@k0kubun
Copy link
Member

k0kubun commented Mar 10, 2018

Ideally mutating #precompiled source code would not make to me. But freezing the returned value of public interface is definitely the breaking change, and I agree that it was unwanted side effect of #967. Thanks to catch this.

@k0kubun k0kubun merged commit 9856684 into haml:master Mar 10, 2018
@k0kubun
Copy link
Member

k0kubun commented Mar 10, 2018

Probably we should have a test that ensures their returned values can be mutated.

netbsd-srcmastr pushed a commit to NetBSD/pkgsrc that referenced this pull request Mar 24, 2020
Update ruby-haml to 5.1.2.
pkgsrc change: add "USE_LANGUAGES=	# none".


## 5.1.2

Released on August 6, 2019
([diff](haml/haml@v5.1.1...v5.1.2)).

* Fix crash in some environments such as New Relic by unfreezing string literals for ParseNode#inspect. [#1016](haml/haml#1016) (thanks [Jalyna](https://github.com/jalyna))

## 5.1.1

Released on May 25, 2019
([diff](haml/haml@v5.1.0...v5.1.1)).

* Fix NameError bug for that happens on ruby 2.6.1-2.6.3 + haml 5.1.0 + rails 4.2.x + erubi. (Akira Matsuda)

## 5.1.0

Released on May 16, 2019
([diff](haml/haml@v5.0.4...v5.1.0)).

* Rails 6 support [#1008](haml/haml#1008) (thanks [Seb Jacobs](https://github.com/sebjacobs))
* Add `escape_filter_interpolations` option for backwards compatibility with haml 4 defaults [#984](haml/haml#984) (thanks [Will Jordan](https://github.com/wjordan))
* Fix error on empty :javascript and :css filter blocks [#986](haml/haml#986) (thanks [Will Jordan](https://github.com/wjordan))
* Respect changes in Haml::Options.defaults in `Haml::TempleEngine` options (Takashi Kokubun)
* Un-freeze TempleEngine precompiled string literals [#983](haml/haml#983) (thanks [Will Jordan](https://github.com/wjordan))
* Various performance/memory improvements [#965](haml/haml#965), [#966](haml/haml#966), [#963](haml/haml#963) (thanks [Dillon Welch](https://github.com/oniofchaos))
* Enable `frozen_string_literal` magic comment for all .rb files [#967](haml/haml#967) (thanks [Dillon Welch](https://github.com/oniofchaos))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants