Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Changed expectations regarding string literals for Ruby 1.9.1

  • Loading branch information...
commit da06c7b9dd85d4577a2f2a44881654f2131bd72f 1 parent 0135c7a
@cjheath cjheath authored
View
4 Rakefile
@@ -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
View
2  lib/treetop/version.rb
@@ -2,7 +2,7 @@ module Treetop #:nodoc:
module VERSION #:nodoc:
MAJOR = 1
MINOR = 4
- TINY = 2
+ TINY = 3
STRING = [MAJOR, MINOR, TINY].join('.')
end
View
20 spec/compiler/character_class_spec.rb
@@ -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
Please sign in to comment.
Something went wrong with that request. Please try again.