Class: String
Instance Method Summary collapse
-
#to_char ⇒ Object
just grab the character code of the last character in the string TODO this won’t work in unicode or utf-8.
Instance Method Details
#to_char ⇒ Object
just grab the character code of the last character in the string TODO this won’t work in unicode or utf-8
41 42 43 44 45 46 47 |
# File 'lib/clevic/extensions.rb', line 41 def to_char if RUBY_VERSION <= '1.8.6' self[0] else bytes.first end end |