Skip to content

Commit

Permalink
Changed expectations regarding string literals for Ruby 1.9.1
Browse files Browse the repository at this point in the history
  • Loading branch information
cjheath committed Nov 21, 2009
1 parent 0135c7a commit da06c7b
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 10 deletions.
4 changes: 4 additions & 0 deletions Rakefile
Expand Up @@ -17,3 +17,7 @@ load "./treetop.gemspec"
Rake::GemPackageTask.new($gemspec) do |pkg|
pkg.need_tar = true
end

task :version do
puts RUBY_VERSION
end
2 changes: 1 addition & 1 deletion lib/treetop/version.rb
Expand Up @@ -2,7 +2,7 @@ module Treetop #:nodoc:
module VERSION #:nodoc:
MAJOR = 1
MINOR = 4
TINY = 2
TINY = 3

STRING = [MAJOR, MINOR, TINY].join('.')
end
Expand Down
20 changes: 11 additions & 9 deletions spec/compiler/character_class_spec.rb
Expand Up @@ -156,15 +156,17 @@ module ModFoo
end
end

describe "A character class containing a \\M- meta-char escape" do
slash = "\\"
testing_expression "[#{slash}M- ]"
it "matches that character only" do
parse("\240").should_not be_nil
parse('\\').should be_nil
parse('M').should be_nil
parse('-').should be_nil
parse(' ').should be_nil
if RUBY_VERSION =~ /\A1\.8\./
describe "A character class containing a \\M- meta-char escape" do
slash = "\\"
testing_expression "[#{slash}M- ]"
it "matches that character only" do
parse("\240").should_not be_nil
parse('\\').should be_nil
parse('M').should be_nil
parse('-').should be_nil
parse(' ').should be_nil
end
end
end

Expand Down

0 comments on commit da06c7b

Please sign in to comment.