Sha256: 00e737e6834857a52814c76b111819b0954a73b4082e738373faa459c02cf814
Contents?: true
Size: 637 Bytes
Versions: 22
Compression:
Stored size: 637 Bytes
Contents
require 'support/parser_helpers' describe "The not keyword" do it "returns a call sexp" do parsed("not self").should == [:call, [:self], '!'.to_sym, [:arglist]] parsed("not 42").should == [:call, [:int, 42], '!'.to_sym, [:arglist]] end end describe "The '!' expression" do it "returns a call sexp" do parsed("!self").should == [:call, [:self], '!'.to_sym, [:arglist]] parsed("!42").should == [:call, [:int, 42], '!'.to_sym, [:arglist]] end end describe "The '!~' expression" do it "does not rewrite as !(lhs =~ rhs)" do parsed("1 !~ 2").should == [:call, [:int, 1], :!~, [:arglist, [:int, 2]]] end end
Version data entries
22 entries across 22 versions & 1 rubygems