From 22752b09366973ab9a05343aae7be9fb1bc14109 Mon Sep 17 00:00:00 2001 From: Michael Pitman Date: Wed, 30 Aug 2017 13:08:21 +1000 Subject: Change the literal regex to an eval expression in order to enable loading of the file under ruby 1.8 --- spec/bundler/shared_helpers_spec.rb | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/spec/bundler/shared_helpers_spec.rb b/spec/bundler/shared_helpers_spec.rb index a93d81f4b5..d8f6e1ef18 100644 --- a/spec/bundler/shared_helpers_spec.rb +++ b/spec/bundler/shared_helpers_spec.rb @@ -279,8 +279,13 @@ RSpec.describe Bundler::SharedHelpers do ) end - context "with a jruby path_separator regex", :ruby => "1.9" do # In versions of jruby that supported ruby 1.8, the path separator was the standard File::PATH_SEPARATOR - let(:regex) { /(? "1.9" do + # In versions of jruby that supported ruby 1.8, the path separator was the standard File::PATH_SEPARATOR + let(:regex) { + # If this is stated as a literal regex we get a syntax error when simply loading this file, + # even if the expression is never evaluated + eval("/(?