Class: String

Inherits:
Object show all
Defined in:
lib/rspec_ext.rb,
lib/ruby_ext/fixes.rb,
lib/ruby_ext/core/miscellaneous.rb

Overview

clone doesn’t unfreeze String

Instance Method Summary collapse

Instance Method Details

#cloneObject



3
4
5
# File 'lib/ruby_ext/fixes.rb', line 3

def clone
  "" + self
end

#dirnameObject



121
122
123
# File 'lib/rspec_ext.rb', line 121

def dirname
  File.expand_path(File.dirname(self))
end

#string_or_symbol?Boolean

Returns:

  • (Boolean)


9
# File 'lib/ruby_ext/core/miscellaneous.rb', line 9

def string_or_symbol?; true end