Skip to content

Commit

Permalink
Ruby 1.8 compat
Browse files Browse the repository at this point in the history
  • Loading branch information
elia committed Apr 23, 2014
1 parent 37ef2f1 commit e2d8ab9
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion lib/opal/nodes/call.rb
Expand Up @@ -113,7 +113,7 @@ def handle_special
end
end

add_special :require, compile: true do
add_special :require, :compile => true do
str = DependencyResolver.new(compiler, arglist[1]).resolve
compiler.requires << str unless str.nil?
fragment ''
Expand Down
2 changes: 1 addition & 1 deletion spec/cli/builder_spec.rb
Expand Up @@ -85,7 +85,7 @@
let(:foo_stubbed) { 'foo stubbed' }

before do
options.merge! stubbed_files: [foo_path]
options.merge! :stubbed_files => [foo_path]
foo_compiler = double('compiler', :compile => nil, :result => foo_stubbed, :requires => [])
compiler_class.stub(:new).with('', :file => foo_path, :requirable => true) { foo_compiler }
end
Expand Down
2 changes: 1 addition & 1 deletion spec/cli/hike_path_finder_spec.rb
Expand Up @@ -4,7 +4,7 @@

describe Opal::HikePathFinder do
subject(:path_finder) { described_class.new(root) }
let(:root) { __dir__ }
let(:root) { File.expand_path('..', __FILE__) }
let(:path) { 'fixtures/opal_file' }
let(:full_path) { File.join(root, path + ext) }
let(:ext) { '.rb' }
Expand Down
2 changes: 1 addition & 1 deletion spec/cli/path_reader_spec.rb
Expand Up @@ -8,7 +8,7 @@
subject(:file_reader) { described_class.new(path_finder) }
let(:path_finder) { double('path_finder') }
let(:path) { 'opal_file' }
let(:full_path) { File.join(__dir__, 'fixtures', 'opal_file.rb') }
let(:full_path) { File.expand_path('../fixtures/opal_file.rb', __FILE__) }
let(:contents) { File.read(full_path) }

before do
Expand Down

0 comments on commit e2d8ab9

Please sign in to comment.