From 8a206c99bb46a980f308f165119af89b72c4ec98 Mon Sep 17 00:00:00 2001 From: Samuel Giddins Date: Sat, 4 Jun 2016 23:24:32 -0500 Subject: [RubyVersion] Make #diff error more helpful --- lib/bundler/ruby_version.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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) -- cgit v1.2.1