Sha256: ec1663150d694afe0d3bd8466ceeb1baa71327d817ab68b2eced821ddc2458c5
Contents?: true
Size: 648 Bytes
Versions: 26
Compression:
Stored size: 648 Bytes
Contents
class Symbol # Symbol's really are just simplified strings. # Thus #to_str seems quite reasonable. # This uses the Kernal#String method. #-- # Maybe just change to #to_s? # BTW: This would be lots faster, I bet, if implemented in core. #++ def to_str String( self ) end end # _____ _ # |_ _|__ ___| |_ # | |/ _ \/ __| __| # | | __/\__ \ |_ # |_|\___||___/\__| # =begin test require 'test/unit' class TCSymbol < Test::Unit::TestCase def test_to_str assert_equal( "a", :a.to_str ) assert_equal( "abc", :abc.to_str ) assert_equal( '#$%', :'#$%'.to_str ) end end =end
Version data entries
26 entries across 26 versions & 1 rubygems