lib/bundler/definition.rb in bundler-1.4.0.rc.1 vs lib/bundler/definition.rb in bundler-1.5.0.rc.1

- old
+ new

@@ -51,11 +51,11 @@ @remote = false @specs = nil @lockfile_contents = "" @ruby_version = ruby_version - if lockfile && File.exists?(lockfile) + if lockfile && File.exist?(lockfile) @lockfile_contents = Bundler.read_file(lockfile) locked = LockfileParser.new(@lockfile_contents) @platforms = locked.platforms if unlock != true @@ -378,10 +378,14 @@ when :version "Your Ruby version is #{actual}, but your Gemfile specified #{expected}" when :engine_version "Your #{Bundler.ruby_version.engine} version is #{actual}, but your Gemfile specified #{ruby_version.engine} #{expected}" when :patchlevel - "Your Ruby patchlevel is #{actual}, but your Gemfile specified #{expected}" + if !expected.is_a?(String) + "The Ruby patchlevel in your Gemfile must be a string" + else + "Your Ruby patchlevel is #{actual}, but your Gemfile specified #{expected}" + end end raise RubyVersionMismatch, msg end end