Pin rubyracer version to 0.10
This is a temporary fix. See https://github.com/wycats/handlebars.js/pull/405#issuecomment-12013108
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
source "http://rubygems.org"
|
||||
|
||||
gem "rake"
|
||||
gem "therubyracer", ">= 0.9.8"
|
||||
gem "therubyracer", ">= 0.9.8", "< 0.11"
|
||||
gem "rspec"
|
||||
|
||||
+4
-6
@@ -2,9 +2,8 @@ GEM
|
||||
remote: http://rubygems.org/
|
||||
specs:
|
||||
diff-lcs (1.1.3)
|
||||
libv8 (3.11.8.11)
|
||||
libv8 (3.3.10.4)
|
||||
rake (10.0.3)
|
||||
ref (1.0.2)
|
||||
rspec (2.12.0)
|
||||
rspec-core (~> 2.12.0)
|
||||
rspec-expectations (~> 2.12.0)
|
||||
@@ -13,9 +12,8 @@ GEM
|
||||
rspec-expectations (2.12.1)
|
||||
diff-lcs (~> 1.1.3)
|
||||
rspec-mocks (2.12.1)
|
||||
therubyracer (0.11.1)
|
||||
libv8 (~> 3.11.8.7)
|
||||
ref
|
||||
therubyracer (0.10.2)
|
||||
libv8 (~> 3.3.10)
|
||||
|
||||
PLATFORMS
|
||||
ruby
|
||||
@@ -23,4 +21,4 @@ PLATFORMS
|
||||
DEPENDENCIES
|
||||
rake
|
||||
rspec
|
||||
therubyracer (>= 0.9.8)
|
||||
therubyracer (>= 0.9.8, < 0.11)
|
||||
|
||||
@@ -1,5 +1,32 @@
|
||||
require "v8"
|
||||
|
||||
# Monkey patches due to bugs in RubyRacer
|
||||
class V8::JSError
|
||||
def initialize(try, to)
|
||||
@to = to
|
||||
begin
|
||||
super(initialize_unsafe(try))
|
||||
rescue Exception => e
|
||||
# Original code does not make an Array here
|
||||
@boundaries = [Boundary.new(:rbframes => e.backtrace)]
|
||||
@value = e
|
||||
super("BUG! please report. JSError#initialize failed!: #{e.message}")
|
||||
end
|
||||
end
|
||||
|
||||
def parse_js_frames(try)
|
||||
raw = @to.rb(try.StackTrace())
|
||||
if raw && !raw.empty?
|
||||
raw.split("\n")[1..-1].tap do |frames|
|
||||
# Original code uses strip!, and the frames are not guaranteed to be strippable
|
||||
frames.each {|frame| frame.strip.chomp!(",")}
|
||||
end
|
||||
else
|
||||
[]
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
module Handlebars
|
||||
module Spec
|
||||
def self.js_backtrace(context)
|
||||
|
||||
Reference in New Issue
Block a user