The spec below (from promise.rb's suite) failed because it asserted the exact position of a stack frame within the backtrace. This broke because, when calling Kernel#caller from a method's arglist (i.e. def fulfill(value = nil, backtrace = caller), JRuby doesn't include that method's stack frame in the backtrace. I worked around that by moving the call into the method's body: lgierth/promise.rb@a3374fa
1) Promise#reject sets the backtrace
Failure/Error: .to include(__FILE__ + ':' + (__LINE__ - 2).to_s)
expected "/home/travis/.rvm/gems/jruby-1.7.8-d19/gems/rspec-core-2.14.7/lib/rspec/core/example.rb:114:in `instance_eval'" to include "/home/travis/build/lgierth/promise.rb/spec/promise_spec.rb:387"
# ./spec/promise_spec.rb:389:in `(root)'
The text was updated successfully, but these errors were encountered:
ghost
referenced
this issue
in lgierth/promise.rb
Jan 2, 2014
The spec below (from promise.rb's suite) failed because it asserted the exact position of a stack frame within the backtrace. This broke because, when calling
Kernel#caller
from a method's arglist (i.e.def fulfill(value = nil, backtrace = caller)
, JRuby doesn't include that method's stack frame in the backtrace. I worked around that by moving the call into the method's body: lgierth/promise.rb@a3374faThe text was updated successfully, but these errors were encountered: