summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSamuel Giddins <segiddins@segiddins.me>2016-06-04 23:24:32 -0500
committerSamuel Giddins <segiddins@segiddins.me>2016-06-05 21:54:12 -0500
commit8a206c99bb46a980f308f165119af89b72c4ec98 (patch)
tree1cff7d68f3b198d2e022613a66161e5d54060637
parenteb8999387838c74e4cc4d95d22332b57b19e73f8 (diff)
downloadbundler-8a206c99bb46a980f308f165119af89b72c4ec98.tar.gz
[RubyVersion] Make #diff error more helpful
-rw-r--r--lib/bundler/ruby_version.rb2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/bundler/ruby_version.rb b/lib/bundler/ruby_version.rb
index 92f9d4c396..89a18cbc77 100644
--- a/lib/bundler/ruby_version.rb
+++ b/lib/bundler/ruby_version.rb
@@ -64,7 +64,7 @@ module Bundler
# 2. ruby_version
# 3. engine_version
def diff(other)
- raise ArgumentError, "Can only diff with a RubyVersion" unless other.is_a?(RubyVersion)
+ raise ArgumentError, "Can only diff with a RubyVersion, not a #{other.class}" unless other.is_a?(RubyVersion)
if engine != other.engine && @input_engine
[:engine, engine, other.engine]
elsif versions.empty? || !matches?(versions, other.gem_version)