lib/glimmer/data_binding/model_binding.rb in glimmer-1.3.1 vs lib/glimmer/data_binding/model_binding.rb in glimmer-2.0.0
- old
+ new
@@ -240,10 +240,15 @@
raise Glimmer::Error, "Unsupported bind processor: #{processor.inspect}"
end
def invoke_proc_with_exact_parameters(proc_object, *args)
return if proc_object.nil?
- args = Concurrent::Array.new(args[0...proc_object.parameters.size])
+ if RUBY_ENGINE == 'opal'
+ # opal doesn't support proc_object.parameters.size properly it seems
+ args = Concurrent::Array.new(args[0...1])
+ else
+ args = Concurrent::Array.new(args[0...proc_object.parameters.size])
+ end
proc_object.call(*args)
end
def invoke_property_reader(object, property_expression)
if property_indexed?(property_expression)