Skip to content
Browse files

pass string to require -- fix for RubyGems bug

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...
1 parent b15cfd2 commit bbc59e460d48352c368cc61cba82b145ab8722dc @stepheneb stepheneb committed Jun 28, 2011
Showing with 1 addition and 1 deletion.
  1. +1 −1 features/support/env.rb
2 features/support/env.rb
@@ -86,7 +86,7 @@ def terminate_background_jobs
-require(SPORK_ROOT + "features/support/bundler_helpers.rb")
+require((SPORK_ROOT + "features/support/bundler_helpers.rb").to_s)

0 comments on commit bbc59e4

Please sign in to comment.
Something went wrong with that request. Please try again.