lib/glimmer/data_binding/model_binding.rb in glimmer-2.7.7 vs lib/glimmer/data_binding/model_binding.rb in glimmer-2.7.8

- old
+ new

@@ -129,10 +129,12 @@ end @nested_property_observers_collection[observer] end def add_observer(observer, extra_options = {}) + # TODO couldn't we have a scenario where it is both computed? and nested_property? at the same time? + # or computed and not nested at the same time (else statement)? if computed? add_computed_observers(observer) elsif nested_property? add_nested_observers(observer) else @@ -250,15 +252,10 @@ raise Glimmer::Error, "Unsupported bind processor: #{processor.inspect}" end def invoke_proc_with_exact_parameters(proc_object, *args) return if proc_object.nil? - 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 + args = Concurrent::Array.new(args[0...proc_object.parameters.size]) proc_object.call(*args) end def invoke_property_reader(object, property_expression) if property_indexed?(property_expression)