lib/facet/symbol/not.rb in facets-1.1.0 vs lib/facet/symbol/not.rb in facets-1.2.0

- old
+ new

@@ -1,40 +2 @@ - -class Symbol - - def not? - self.to_s.slice(0,1) == '~' - end - - def ~@ - if self.to_s.slice(0,1) == '~' - "#{self.to_s[1..-1]}".to_sym - else - "~#{self}".to_sym - end - end - -end - - -# _____ _ -# |_ _|__ ___| |_ -# | |/ _ \/ __| __| -# | | __/\__ \ |_ -# |_|\___||___/\__| -# -=begin test - - require 'test/unit' - - class TCSymbol < Test::Unit::TestCase - - def test_not - assert_equal( :"~a", ~:a ) - a = :a - n = ~a - assert( n.not? ) - end - - end - -=end +require 'facets/core/symbol/not.rb' \ No newline at end of file