Disable tests on backtraces w/ unknown line numbers
MODIFY
mrbgems/mruby-kernel-ext/test/kernel.rb
mrbgems/mruby-kernel-ext/test/kernel.rb
@@ -20,6 +20,9 @@ assert('Kernel.caller, Kernel#caller') do
bar(*args)
end
end
+
+ skip "backtrace isn't available" if(c.new.baz(0)[0].include?("unknown"))
+
assert_equal "kernel.rb:#{caller_lineno}:in foo", c.new.baz(0)[0][-19..-1]
assert_equal "bar", c.new.baz[0][-3..-1]
assert_equal "foo", c.new.baz(0)[0][-3..-1]

MODIFY
mrbgems/mruby-proc-ext/test/proc.rb
mrbgems/mruby-proc-ext/test/proc.rb
@@ -7,6 +7,9 @@ def enable_debug_info?
raise
rescue => e
@enable_debug_info = !e.backtrace.empty?
+ if(@enable_debug_info && e.backtrace[0].include?("(unknown)"))
+ @enable_debug_info = false
+ end
end
end

MODIFY
test/t/exception.rb
test/t/exception.rb
@@ -382,7 +382,8 @@ def backtrace_available?
begin
raise "XXX"
rescue => exception
- not exception.backtrace.empty?
+ return false if exception.backtrace.empty?
+ not exception.backtrace[0].include?("unknown")
end
end

Disable tests on backtraces w/ unknown line numbers