Skip to content

Commit

Permalink
Different handling of .to_s method in ruby 1.9 for one-element array
Browse files Browse the repository at this point in the history
  • Loading branch information
willaerk committed Jan 30, 2013
1 parent 5f6e140 commit dd64761
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/rspec-puppet/matchers/count_generic.rb
Expand Up @@ -3,7 +3,7 @@ module ManifestMatchers
class CountGeneric
def initialize(type, count, *method)
if type.nil?
@type = method.to_s.gsub(/^have_(.+)_resource_count$/, '\1')
@type = method[0].to_s.gsub(/^have_(.+)_resource_count$/, '\1')
else
@type = type
end
Expand Down

0 comments on commit dd64761

Please sign in to comment.