Sha256: c6dd2eed3b7fc6d7ea3f24bc76b7397ee47f33fb7221a13f2d7d58a47fb01c9d
Contents?: true
Size: 524 Bytes
Versions: 10
Compression:
Stored size: 524 Bytes
Contents
#-- # CREDIT Thomas Sawyer #++ class Symbol # Just like String#chomp. # def chomp(seperator=nil) to_s.chomp(seperator.to_s).to_sym end # Just like String#lchomp. # def lchomp(str) to_s.reverse.chomp(str).reverse.to_sym end end # _____ _ # |_ _|__ ___| |_ # | |/ _ \/ __| __| # | | __/\__ \ |_ # |_|\___||___/\__| # =begin test require 'test/unit' class TestSymbol < Test::Unit::TestCase def test_chomp assert_equal( :a, :ab.chomp(:b) ) end end =end
Version data entries
10 entries across 10 versions & 1 rubygems