Skip to content

Commit

Permalink
Teach proxy_class how to work with root-level superclasses
Browse files Browse the repository at this point in the history
  • Loading branch information
technoweenie committed Oct 17, 2019
1 parent f9199fc commit f2e8694
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/faraday/deprecate.rb
Expand Up @@ -12,7 +12,7 @@ def self.proxy_class(new_klass)
class << k
extend Faraday::Deprecate
# Make this more human readable than #<Class:Faraday::ClientError>
klass_name = superclass.to_s[/^#<Class:(\w*::\w*)>$/, 1]
klass_name = superclass.to_s[/^#<Class:(\w{1}[\w:]*)>$/, 1]
deprecate :new, "#{klass_name}.new", '1.0'
deprecate :inherited, klass_name, '1.0'
end
Expand Down

0 comments on commit f2e8694

Please sign in to comment.