Class: Symbol

Inherits:
Object show all
Defined in:
lib/subhash.rb

Overview

Added missing <=> function in Symbol of ruby 1.8

Instance Method Summary collapse

Instance Method Details

#<=>(other) ⇒ Object



33
34
35
36
# File 'lib/subhash.rb', line 33

def <=>(other)
  return to_s <=> other if other.is_a?(String)
  to_s <=> other.to_s
end