Skip to content

Commit

Permalink
Fix exception error message in Dependency#new
Browse files Browse the repository at this point in the history
which was always printing 'nil' for the invalid dependency type as it was attempting to display @type before it had been initialized.  Use the type parameter instead.
  • Loading branch information
sampierson committed Oct 19, 2010
1 parent ded0189 commit cf35d78
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/rubygems/dependency.rb
Expand Up @@ -54,7 +54,7 @@ def initialize name, *requirements

unless TYPES.include? type
raise ArgumentError, "Valid types are #{TYPES.inspect}, "
+ "not #{@type.inspect}"
+ "not #{type.inspect}"
end

@name = name
Expand Down

0 comments on commit cf35d78

Please sign in to comment.