Skip to content

Commit

Permalink
Fix JRUBY-5550: Using shoulda prevents Rails from running tests in ru…
Browse files Browse the repository at this point in the history
…by1.9 mode

Array#join under 1.9 mode tries to coerce non-strings using to_str. NoMethodError is ignored, but in our case we ignored it and left $! set. This prevented Miniunit from running tests.
  • Loading branch information
headius committed Mar 4, 2011
1 parent 0eec94b commit 3cce507
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/org/jruby/RubyClass.java
Expand Up @@ -633,6 +633,8 @@ public IRubyObject finvokeChecked(ThreadContext context, IRubyObject self, Strin
if(self.respondsTo(name)) {
throw e;
} else {
// we swallow, so we also must clear $!
context.setErrorInfo(context.nil);
return null;
}
} else {
Expand Down

0 comments on commit 3cce507

Please sign in to comment.