qiniu / ruby-sdk

Qiniu Resource (Cloud) Storage SDK for Ruby
MIT License
164 stars 138 forks source link

StackLevel to deep error when printing any Qiniu::RS::Exception subclass #23

Closed hayeah closed 11 years ago

hayeah commented 11 years ago

This causes infinite recursion for Ruby 1.9.3, probably because "inspect" calls "to_s"

class Exception < RuntimeError
      def to_s
        inspect
      end
end

It's fine if I remove this method.

hayeah commented 11 years ago

See https://github.com/qiniu/ruby-sdk/pull/24