lib/cldr-plurals/ruby_emitter.rb in cldr-plurals-1.1.1 vs lib/cldr-plurals/ruby_emitter.rb in cldr-plurals-1.2.0

- old
+ new

@@ -2,11 +2,11 @@ module CldrPlurals class RubyEmitter < Compiler::Emitter class << self - RUNTIME_VARS = %w(n i v w f t) + RUNTIME_VARS = %w(n i f t v w e) def emit_rules(rule_list) parts = rule_list.rules.map do |rule| "(#{emit_rule(rule)} ? :#{rule.name} : " end + [':other'] @@ -18,10 +18,10 @@ def emit_rule(rule) emit(rule.root) end def emit_rule_standalone(rule) - "lambda { |n, i, f, t, v, w| #{emit_rule(rule)} }" + "lambda { |#{RUNTIME_VARS.join(', ')}| #{emit_rule(rule)} }" end protected def build_runtime_vars