herb 0.8.8 → 0.8.9

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: 05fa9df64f2875854890ec08bae7fe6447784803d41d7695e4a41ac01e7f298f
4
- data.tar.gz: cb10e13f50cffa272b1f61206979a4be79f8346eca0aa4f72b7ee0d1ec84b0f6
3
+ metadata.gz: d9b42d0123634348d9e777dbd6889093262e59df2ee067fbd5a9b9c3a73e701e
4
+ data.tar.gz: 2f68d9250ae09827e1946c4b2ed83af9588af36e25522fe76b21eb191a8af2f0
5
5
  SHA512:
6
- metadata.gz: f9e5835ed8cbe6fc351d289bd54c6d1b3dd4417501aef715769cffe78a805ca6ef54e3c4fa6382de92c522835dc30370b9b5bae7037b5d05afbe5634422b1613
7
- data.tar.gz: 9f46145ec10a8b9a311ad5757687f3a44909187dcace3a07da0befd3e58a7474f217ad86ff9396ff65bf0e4bd9b04331a1001ac9688c015197b1fe52563fa595
6
+ metadata.gz: 66d65923cffe6d108b4cf48be595d270c56b180596d457a41dba859e81642f894ad5af027a7c8e809cda2ac3c012e73bcfb46c634a9c07f6ac0fbe0a0ddca54f
7
+ data.tar.gz: d2b924c70779af2e4a2f4d9a34a5c97a9700df4b0c4c929397afdf57a226c108f0e5233854d9748abf4892e377703a0c05a51d6df374174168dff5d49e67e1a5
data/ext/herb/nodes.c CHANGED
@@ -464,7 +464,7 @@ static VALUE rb_erb_content_node_from_c_struct(AST_ERB_CONTENT_NODE_T* erb_conte
464
464
  VALUE erb_content_node_tag_opening = rb_token_from_c_struct(erb_content_node->tag_opening);
465
465
  VALUE erb_content_node_content = rb_token_from_c_struct(erb_content_node->content);
466
466
  VALUE erb_content_node_tag_closing = rb_token_from_c_struct(erb_content_node->tag_closing);
467
- /* #<Herb::Template::AnalyzedRubyField:0x00007ff77f84a9f8 @name="analyzed_ruby", @options={kind: nil}> */
467
+ /* #<Herb::Template::AnalyzedRubyField:0x00007ffb7f81b0a0 @name="analyzed_ruby", @options={kind: nil}> */
468
468
  VALUE erb_content_node_analyzed_ruby = Qnil;
469
469
  VALUE erb_content_node_parsed = (erb_content_node->parsed) ? Qtrue : Qfalse;
470
470
  VALUE erb_content_node_valid = (erb_content_node->valid) ? Qtrue : Qfalse;
data/lib/herb/version.rb CHANGED
@@ -2,5 +2,5 @@
2
2
  # typed: true
3
3
 
4
4
  module Herb
5
- VERSION = "0.8.8"
5
+ VERSION = "0.8.9"
6
6
  end
data/src/analyze.c CHANGED
@@ -280,6 +280,8 @@ static control_type_t detect_control_type(AST_ERB_CONTENT_NODE_T* erb_node) {
280
280
  if (has_ensure_node(ruby)) { return CONTROL_TYPE_ENSURE; }
281
281
  if (has_block_closing(ruby)) { return CONTROL_TYPE_BLOCK_CLOSE; }
282
282
 
283
+ if (ruby->unclosed_control_flow_count == 0 && !has_yield_node(ruby)) { return CONTROL_TYPE_UNKNOWN; }
284
+
283
285
  return find_earliest_control_keyword(root, ruby->parser.start);
284
286
  }
285
287
 
@@ -1,6 +1,6 @@
1
1
  #ifndef HERB_VERSION_H
2
2
  #define HERB_VERSION_H
3
3
 
4
- #define HERB_VERSION "0.8.8"
4
+ #define HERB_VERSION "0.8.9"
5
5
 
6
6
  #endif
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: herb
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.8.8
4
+ version: 0.8.9
5
5
  platform: ruby
6
6
  authors:
7
7
  - Marco Roth