lib/bundler/ruby_version.rb in bundler-1.2.0.pre.1 vs lib/bundler/ruby_version.rb in bundler-1.2.0.rc
- old
+ new
@@ -15,10 +15,12 @@
# must not be specified, or the engine version
# specified must match the version.
@version = version
@engine = engine || "ruby"
+ # keep track of the engine specified by the user
+ @input_engine = engine
@engine_version = engine_version || version
end
def to_s
output = "ruby #{version}"
@@ -38,14 +40,14 @@
# The priority of attributes are
# 1. engine
# 2. ruby_version
# 3. engine_version
def diff(other)
- if engine != other.engine
+ if engine != other.engine && @input_engine
[ :engine, engine, other.engine ]
elsif version != other.version
[ :version, version, other.version ]
- elsif engine_version != other.engine_version
+ elsif engine_version != other.engine_version && @input_engine
[ :engine_version, engine_version, other.engine_version ]
else
nil
end
end