File tree Expand file tree Collapse file tree 1 file changed +2
-2
lines changed Expand file tree Collapse file tree 1 file changed +2
-2
lines changed Original file line number Diff line number Diff line change @@ -88,12 +88,12 @@ def local_method?(instance, name)
88
88
end
89
89
90
90
def sans_backtrace ( backtrace , caller ) #:nodoc:
91
- saned = backtrace . reject { |frame | frame =~ FILE_REGEXP || ( frame =~ /\. java:/ && RUBY_PLATFORM =~ /java/ ) }
91
+ saned = backtrace . reject { |frame | frame =~ FILE_REGEXP || ( frame =~ /\. java:/ && RUBY_PLATFORM =~ /java/ ) || ( frame =~ /^kernel \/ / && RUBY_ENGINE =~ /rbx/ ) }
92
92
saned - caller
93
93
end
94
94
95
95
def handle_argument_error? ( instance , error , caller )
96
- not_debugging? ( instance ) && error . message =~ /wrong number of arguments/ && begin
96
+ not_debugging? ( instance ) && ( error . message =~ /wrong number of arguments/ || error . message =~ /given \d *, expected \d */ ) && begin
97
97
saned = sans_backtrace ( error . backtrace , caller )
98
98
# Ruby 1.9 always include the called method in the backtrace
99
99
saned . empty? || ( saned . size == 1 && RUBY_VERSION >= '1.9' )
You can’t perform that action at this time.
0 commit comments