Class: Object

Inherits:
BasicObject
Defined in:
Library/Homebrew/cask/lib/hbc/utils.rb

Overview

monkeypatch Object - not a great idea

Instance Method Summary collapse

Instance Method Details

#utf8_inspectObject



12
13
14
15
16
# File 'Library/Homebrew/cask/lib/hbc/utils.rb', line 12

def utf8_inspect
  return inspect unless defined?(Encoding)
  return map(&:utf8_inspect) if respond_to?(:map)
  inspect.force_encoding("UTF-8").sub(/\A"(.*)"\Z/, '\1')
end