summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKornelius Kalnbach <murphy@rubychan.de>2017-09-03 11:01:37 +0200
committerKornelius Kalnbach <murphy@rubychan.de>2017-09-03 11:06:24 +0200
commit6f95c964d94a35b306e8086018917d16d7adc9ca (patch)
tree8425f526b92f66e10b2f08aebbd62687261b3f27
parent436c1a48074d786a542bf59ea2ea2da69cb121b9 (diff)
downloadcoderay-6f95c964d94a35b306e8086018917d16d7adc9ca.tar.gz
restore support for Ruby 1.8.7
-rw-r--r--Gemfile18
-rw-r--r--lib/coderay/scanners/java.rb2
2 files changed, 10 insertions, 10 deletions
diff --git a/Gemfile b/Gemfile
index f07e274..951e3d1 100644
--- a/Gemfile
+++ b/Gemfile
@@ -6,13 +6,13 @@ gemspec
# Add dependencies to develop your gem here.
# Include everything needed to run rake, tests, features, etc.
group :development do
- gem "bundler"
- gem "rake", ">= 10.5"
- gem "RedCloth", RUBY_PLATFORM == 'java' ? "= 4.2.9" : ">= 4.0.3"
- gem "term-ansicolor", ">= 1.3.2"
- gem 'tins', '>= 1.6.0'
- gem "shoulda-context", ">= 1.2.1"
- gem "test-unit"
- gem "json", ">= 1.8" if RUBY_VERSION < '1.9'
- gem "rdoc", ">= 4.2.2"
+ gem 'bundler'
+ gem 'rake', RUBY_VERSION < '1.9' ? '~> 10.5' : '>= 10.5'
+ gem 'RedCloth', RUBY_PLATFORM == 'java' ? '= 4.2.9' : '>= 4.0.3'
+ gem 'term-ansicolor', '>= 1.3.2'
+ gem 'tins', RUBY_VERSION < '2.0' ? '~> 1.6.0' : '>= 1.6.0'
+ gem 'shoulda-context', RUBY_VERSION < '1.9' ? '= 1.2.1' : '>= 1.2.1'
+ gem 'test-unit', RUBY_VERSION < '1.9' ? '~> 2.0' : '>= 3.0'
+ gem 'json', '>= 1.8' if RUBY_VERSION < '1.9'
+ gem 'rdoc', RUBY_VERSION < '1.9' ? '~> 4.2.2' : '>= 4.2.2'
end
diff --git a/lib/coderay/scanners/java.rb b/lib/coderay/scanners/java.rb
index 5fde433..3ac7efe 100644
--- a/lib/coderay/scanners/java.rb
+++ b/lib/coderay/scanners/java.rb
@@ -44,7 +44,7 @@ module Scanners
'"' => /[^\\"]+/,
'/' => /[^\\\/]+/,
} # :nodoc:
- IDENT = /[[[:alpha:]]_][[[:alnum:]]_]*/ # :nodoc:
+ IDENT = RUBY_VERSION < '1.9' ? /[a-zA-Z_][A-Za-z_0-9]*/ : /[[[:alpha:]]_][[[:alnum:]]_]*/ # :nodoc:
protected