foxtail-runtime 0.6.0 → 0.6.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: '0481921f0a1d7f75a66e7d46080aa646d5e5543ef357c3a09762c5fcf73f683f'
4
- data.tar.gz: 37c9d137ac12ad305998d675b2ad571dd19370f6226527e4d219f1887df968ee
3
+ metadata.gz: 910edf16aa47af13bd016e4a61e515a61d6f69fa5b3704195c449371da0e21e8
4
+ data.tar.gz: 8879628635ece445517e2b0409a56a4026ce04f56faf52c317922b7332b1044c
5
5
  SHA512:
6
- metadata.gz: e90826bf95eec404617e04c254c40c612ca01c7e10910126018de9cf460c5ba263e7de1c3d403f424f3341647255cc317b8fd2b21eeef66175cec5d9ea1914f5
7
- data.tar.gz: 564c13c75088c2307b4df10a5ab84bd9556eb7cecf3d39b36decf4231edd6df6bded5bfe8148989f672aff2dd5b844cf979d025de959b4e091f837d83eccb381
6
+ metadata.gz: d8ba6ac7ea4aba84ec6d748ac87d49876407c0a221dec6f378ac87bbcf70023df95d579b0d145a27ea7e728f52ff11d54ba048f15ed3b49672133d6620977291
7
+ data.tar.gz: 131d0c122bd6bedf89b4f2948332367b1cf0b7dd8a211248b6add51248df5a617a47aa39f4827ca13666636637994a54eb23cbca41460adbf72c5e3ef51082cc
data/CHANGELOG.md CHANGED
@@ -1,5 +1,10 @@
1
1
  ## [Unreleased]
2
2
 
3
+ ## [0.6.1] - 2026-05-10
4
+
5
+ ### Fixed
6
+ - Fix term call arguments being silently ignored during resolution (#182)
7
+
3
8
  ## [0.6.0] - 2026-05-09
4
9
 
5
10
  ### Added
@@ -185,16 +185,26 @@ module Foxtail
185
185
  return "{-#{name}}"
186
186
  end
187
187
 
188
+ # Build an isolated scope containing only the named call arguments.
189
+ # Per the Fluent spec, term scope must not inherit the caller's external variables.
190
+ named_args = expr.args.filter_map {|arg|
191
+ next unless arg.is_a?(Parser::AST::NamedArgument)
192
+
193
+ [arg.name.to_sym, resolve_expression(arg.value, scope)]
194
+ }.to_h
195
+ term_scope = scope.term_scope(**named_args)
196
+
188
197
  # Resolve term value
189
198
  if attr
190
- result = resolve_term_attribute(term, attr, scope)
199
+ result = resolve_term_attribute(term, attr, term_scope)
191
200
  elsif term.value
192
- result = resolve_pattern(term.value, scope)
201
+ result = resolve_pattern(term.value, term_scope)
193
202
  else
194
203
  scope.add_error("No value: -#{name}")
195
204
  result = "{-#{name}}"
196
205
  end
197
206
 
207
+ scope.errors.concat(term_scope.errors)
198
208
  scope.release(name)
199
209
  result
200
210
  end
@@ -53,6 +53,15 @@ module Foxtail
53
53
  child
54
54
  end
55
55
 
56
+ # Create an isolated scope for term resolution.
57
+ # Unlike child_scope, this does NOT inherit external variables — only the
58
+ # explicitly passed named call arguments are visible as variables inside the term.
59
+ def term_scope(**named_args)
60
+ child = self.class.new(@bundle, **named_args)
61
+ child.instance_variable_set(:@dirty, @dirty.dup)
62
+ child
63
+ end
64
+
56
65
  # Reset locals (used in some resolution contexts)
57
66
  def clear_locals = @locals.clear
58
67
 
@@ -3,7 +3,7 @@
3
3
  module Foxtail
4
4
  module Runtime
5
5
  # Current version of the Foxtail runtime gem
6
- VERSION = "0.6.0"
6
+ VERSION = "0.6.1"
7
7
  public_constant :VERSION
8
8
  end
9
9
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: foxtail-runtime
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.6.0
4
+ version: 0.6.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - OZAWA Sakuro
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2026-05-09 00:00:00.000000000 Z
11
+ date: 2026-05-10 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bigdecimal