From: "shugo (Shugo Maeda)" Date: 2012-08-22T11:42:07+09:00 Subject: [ruby-core:47269] [ruby-trunk - Bug #6867][Assigned] super in a Mutex#synchronize block Issue #6867 has been updated by shugo (Shugo Maeda). Status changed from Open to Assigned Assignee changed from shugo (Shugo Maeda) to tenderlovemaking (Aaron Patterson) tenderlovemaking (Aaron Patterson) wrote: > Shugo - do you have a better fix for this, or may I apply this patch? I haven't come up with a better solution. Could you apply the patch? ---------------------------------------- Bug #6867: super in a Mutex#synchronize block https://bugs.ruby-lang.org/issues/6867#change-28966 Author: Eregon (Benoit Daloze) Status: Assigned Priority: Normal Assignee: tenderlovemaking (Aaron Patterson) Category: core Target version: 2.0.0 ruby -v: ruby 2.0.0dev (2012-08-14 trunk 36700) [x86_64-darwin10.8.0] The following code: require 'thread' class Parent def meth end end class Child < Parent def meth Mutex.new.synchronize do super end end end Child.new.meth raises bug_super.rb:13:in `block in meth': can't find the method for super, which may be called in an orphan block (NoMethodError) from :10:in `synchronize' from bug_super.rb:12:in `meth' from bug_super.rb:18:in `
' I met the bug with the listen gem: https://github.com/guard/listen/blob/master/lib/listen/adapters/darwin.rb#L22-25 . -- http://bugs.ruby-lang.org/