Skip to content

Use Kernel#inspect instead of #to_s

gitlab-qa-bot requested to merge github/fork/sanemat/fix/class-name into master

Created by: sanemat

Kernel#inspect does not call #to_s anymore, on Ruby2.0.0

klass = Class.new do
  def self.to_s
    "MyClass"
  end
end

Ruby1.9.3
=> MyClass

Ruby2.0.0
=> #<Class:0x007ffe0c4c2ab8>

Merge request reports