Skip to content

Commit

Permalink
pass string to require -- fix for RubyGems bug
Browse files Browse the repository at this point in the history
SPORK_ROOT is a pathname object and the result of adding 
a string to it is a Pathname object.

RubyGems 1.6.0 through 1.8.5 pass the require path to
Regexp.escape(). In Ruby 1.9.2 passing a Pathname to
Regex.escape() throws this error:

  "can't convert Pathname to String (TypeError)"

This RubyGems bug is fixed but not yet in a release.

This bug does not show up when using bundler exec to run
cucumber feature tests -- only when using cucumber directly.
  • Loading branch information
stepheneb committed Jun 28, 2011
1 parent b15cfd2 commit bbc59e4
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion features/support/env.rb
Original file line number Diff line number Diff line change
@@ -86,7 +86,7 @@ def terminate_background_jobs
end
end

require(SPORK_ROOT + "features/support/bundler_helpers.rb")
require((SPORK_ROOT + "features/support/bundler_helpers.rb").to_s)
BundlerHelpers.set_gemfile(ENV["GEMFILE"])


0 comments on commit bbc59e4

Please sign in to comment.