haml 7.5.0 → 7.5.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 6436b78efc92438b9bd1a948dd0672bc8d3798c654fa2846d310386ef0552084
4
- data.tar.gz: b8c2657b36c209e49c0e58c95470c45cc8213e30b1eb17458e0550db37bd616e
3
+ metadata.gz: 8cf8d7cf95a5096090897276b03dd8073e73705fa1b880bba96af5dceb3b2c55
4
+ data.tar.gz: 4d1e1ff1bd53361d0a31c78533a838e60e52d10c5646ff0d8bbd87a552ccc658
5
5
  SHA512:
6
- metadata.gz: 0530e52beb2fd093dfeb7d55c107b92a84f91e854bd38ed2e919349fcb820043cd3dd6e328ba4b2b24aa1b64ee8fcf2faf4a36dae1da60cb1b0a2b6abef7f531
7
- data.tar.gz: b5a94fe5203318f1eaefa08b86e418090b8d0ef48cb94afa219512d87b116f568833cdf42e8f24a0a5e540d47b4b98dfb8a04f9e372bfe99d912d01dc41c2c24
6
+ metadata.gz: 3bbfe67377d06702fa3240048fd25410f885f05a503d4e8e7793f0ccbba9ffb99e601d46068150d2170c11a3807660571fe26f337becfc155758f05cc470bc40
7
+ data.tar.gz: '01159a17fda467397309cfa38de5ad7b1e8820d506447b87221a8cdc087f02e8546cb1d2ad9a358d4ad0fa0c0b29c60b0a03bcf692e2fa551d748111701d8adc'
data/CHANGELOG.md CHANGED
@@ -1,5 +1,9 @@
1
1
  # Haml Changelog
2
2
 
3
+ ## 7.5.1
4
+
5
+ * Improve frozen strings management https://github.com/haml/haml/pull/1205
6
+
3
7
  ## 7.5.0
4
8
 
5
9
  * Compile a multi-line attribute hash statically https://github.com/haml/haml/pull/1222
@@ -36,7 +36,7 @@ module Haml
36
36
  return exps
37
37
  end
38
38
 
39
- strlit_body = String.new
39
+ strlit_body = +''
40
40
  exps.each do |type, arg|
41
41
  case type
42
42
  when :static
data/lib/haml/engine.rb CHANGED
@@ -53,7 +53,7 @@ module Haml
53
53
  end
54
54
 
55
55
  def precompiled_with_ambles(_local_names, after_preamble:)
56
- "#{after_preamble.tr("\n", ';')}#{@precompiled}".dup
56
+ "#{after_preamble.tr("\n", ';')}#{@precompiled}"
57
57
  end
58
58
  end
59
59
  end
data/lib/haml/parser.rb CHANGED
@@ -227,7 +227,7 @@ module Haml
227
227
  end
228
228
 
229
229
  def inspect
230
- %Q[(#{type} #{value.inspect}#{children.each_with_object(''.dup) {|c, s| s << "\n#{c.inspect.gsub!(/^/, ' ')}"}})].dup
230
+ %Q[(#{type} #{value.inspect}#{children.each_with_object(+'') {|c, s| s << "\n#{c.inspect.gsub!(/^/, ' ')}"}})]
231
231
  end
232
232
  end
233
233
 
@@ -403,7 +403,7 @@ module Haml
403
403
  def haml_comment(text)
404
404
  if filter_opened?
405
405
  @flat = true
406
- @filter_buffer = String.new
406
+ @filter_buffer = +''
407
407
  @filter_buffer << "#{text}\n" unless text.empty?
408
408
  text = @filter_buffer
409
409
  # If we don't know the indentation by now, it'll be set in Line#tabs
@@ -539,7 +539,7 @@ module Haml
539
539
 
540
540
  if filter_opened?
541
541
  @flat = true
542
- @filter_buffer = String.new
542
+ @filter_buffer = +''
543
543
  # If we don't know the indentation by now, it'll be set in Line#tabs
544
544
  @flat_spaces = @indentation * (@template_tabs+1) if @indentation
545
545
  end
@@ -749,7 +749,7 @@ module Haml
749
749
  end
750
750
 
751
751
  static_attributes = {}
752
- dynamic_attributes = "{".dup
752
+ dynamic_attributes = +"{"
753
753
  attributes.each do |name, (type, val)|
754
754
  if type == :static
755
755
  static_attributes[name] = val
@@ -789,7 +789,7 @@ module Haml
789
789
 
790
790
  return name, [:static, content.first[1]] if content.size == 1
791
791
  return name, [:dynamic,
792
- %!"#{content.each_with_object(''.dup) {|(t, v), s| s << (t == :str ? Util.inspect_obj(v)[1...-1] : "\#{#{v}}")}}"!]
792
+ %!"#{content.each_with_object(+'') {|(t, v), s| s << (t == :str ? Util.inspect_obj(v)[1...-1] : "\#{#{v}}")}}"!]
793
793
  end
794
794
 
795
795
  def next_line
data/lib/haml/util.rb CHANGED
@@ -168,7 +168,7 @@ MSG
168
168
  # and the rest of the string.
169
169
  # `["Foo (Bar (Baz bang) bop)", " (Bang (bop bip))"]` in the example above.
170
170
  def balance(scanner, start, finish, count = 0)
171
- str = ''.dup
171
+ str = +''
172
172
  scanner = StringScanner.new(scanner) unless scanner.is_a? StringScanner
173
173
  regexp = Regexp.new("(.*?)[\\#{start.chr}\\#{finish.chr}]", Regexp::MULTILINE)
174
174
  while scanner.scan(regexp)
@@ -201,7 +201,7 @@ MSG
201
201
  end
202
202
 
203
203
  def unescape_interpolation(str)
204
- res = ''.dup
204
+ res = +''
205
205
  rest = Haml::Util.handle_interpolation str.dump do |scan|
206
206
  escapes = (scan[2].size - 1) / 2
207
207
  char = scan[3] # '{', '@' or '$'
data/lib/haml/version.rb CHANGED
@@ -1,4 +1,4 @@
1
1
  # frozen_string_literal: true
2
2
  module Haml
3
- VERSION = '7.5.0'
3
+ VERSION = '7.5.1'
4
4
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: haml
3
3
  version: !ruby/object:Gem::Version
4
- version: 7.5.0
4
+ version: 7.5.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Natalie Weizenbaum