lib/opal/nodes/super.rb in opal-1.3.2 vs lib/opal/nodes/super.rb in opal-1.4.0.alpha1

- old
+ new

@@ -68,18 +68,18 @@ 'true' end def super_method_invocation helper :find_super - "$find_super(self, '#{method_id}', #{def_scope_identity}, #{defined_check_param}, #{allow_stubs})" + "$find_super(#{scope.self}, '#{method_id}', #{def_scope_identity}, #{defined_check_param}, #{allow_stubs})" end def super_block_invocation helper :find_block_super chain, cur_defn, mid = scope.super_chain trys = chain.map { |c| "#{c}.$$def" }.join(' || ') - "$find_block_super(self, #{mid}, (#{trys} || #{cur_defn}), #{defined_check_param}, #{implicit_arguments_param})" + "$find_block_super(#{scope.self}, #{mid}, (#{trys} || #{cur_defn}), #{defined_check_param}, #{implicit_arguments_param})" end def compile_method_body push ', ' if scope.def? @@ -151,10 +151,10 @@ # preserve a block if we have one already but otherwise, assume a block is coming from higher # up the chain unless iter.type == :iter # Need to support passing block up even if it's not referenced in this method at all scope.uses_block! - @iter = s(:js_tmp, '$iter') + @iter = s(:js_tmp, scope.block_name || '$yield') end end def compile if def_scope