Skip to content

Commit

Permalink
Support Ruby 2.2
Browse files Browse the repository at this point in the history
  • Loading branch information
tooky committed Mar 19, 2015
1 parent e311b1e commit 3875ad2
Show file tree
Hide file tree
Showing 5 changed files with 10 additions and 5 deletions.
6 changes: 3 additions & 3 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
rvm:
- 2.1.0
- 2.0.0
- 2.2
- 2.1
- 2.0
- 1.9.3
- jruby-1.7.12

Expand All @@ -9,7 +10,6 @@ branches:
only:
- master
- v1.3.x-bugfix
- ruby-2-1-support

notifications:
email:
Expand Down
2 changes: 1 addition & 1 deletion lib/cucumber/core_ext/instance_exec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ def cucumber_run_with_backtrace_filtering(pseudo_method)
end
end

INSTANCE_EXEC_OFFSET = (Cucumber::RUBY_2_1 || Cucumber::RUBY_2_0 || Cucumber::RUBY_1_9 || Cucumber::JRUBY) ? -3 : -4
INSTANCE_EXEC_OFFSET = -3

def replace_instance_exec_invocation_line!(backtrace, instance_exec_invocation_line, pseudo_method)
return if Cucumber.use_full_backtrace
Expand Down
1 change: 1 addition & 0 deletions lib/cucumber/platform.rb
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ module Cucumber
WINDOWS_MRI = WINDOWS && !JRUBY
RAILS = defined?(Rails)
RUBY_BINARY = File.join(RbConfig::CONFIG['bindir'], RbConfig::CONFIG['ruby_install_name'])
RUBY_2_2 = RUBY_VERSION =~ /^2\.2/
RUBY_2_1 = RUBY_VERSION =~ /^2\.1/
RUBY_2_0 = RUBY_VERSION =~ /^2\.0/
RUBY_1_9 = RUBY_VERSION =~ /^1\.9/
Expand Down
2 changes: 1 addition & 1 deletion lib/cucumber/runtime.rb
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ class FileNotFoundException < FileException
end

class FeatureFolderNotFoundException < FileException
include FixRuby21Bug9285 if Cucumber::RUBY_2_1
include FixRuby21Bug9285 if Cucumber::RUBY_2_1 || Cucumber::RUBY_2_2
end

require 'cucumber/core'
Expand Down
4 changes: 4 additions & 0 deletions spec/cucumber/core_ext/instance_exec_spec.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
require 'cucumber/core_ext/instance_exec'

describe 'cucumber_instance_exec' do
end

0 comments on commit 3875ad2

Please sign in to comment.