Skip to content

Commit 6f95c96

Browse files
committed
restore support for Ruby 1.8.7
1 parent 436c1a4 commit 6f95c96

File tree

2 files changed

+10
-10
lines changed

2 files changed

+10
-10
lines changed

Gemfile

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -6,13 +6,13 @@ gemspec
66
# Add dependencies to develop your gem here.
77
# Include everything needed to run rake, tests, features, etc.
88
group :development do
9-
gem "bundler"
10-
gem "rake", ">= 10.5"
11-
gem "RedCloth", RUBY_PLATFORM == 'java' ? "= 4.2.9" : ">= 4.0.3"
12-
gem "term-ansicolor", ">= 1.3.2"
13-
gem 'tins', '>= 1.6.0'
14-
gem "shoulda-context", ">= 1.2.1"
15-
gem "test-unit"
16-
gem "json", ">= 1.8" if RUBY_VERSION < '1.9'
17-
gem "rdoc", ">= 4.2.2"
9+
gem 'bundler'
10+
gem 'rake', RUBY_VERSION < '1.9' ? '~> 10.5' : '>= 10.5'
11+
gem 'RedCloth', RUBY_PLATFORM == 'java' ? '= 4.2.9' : '>= 4.0.3'
12+
gem 'term-ansicolor', '>= 1.3.2'
13+
gem 'tins', RUBY_VERSION < '2.0' ? '~> 1.6.0' : '>= 1.6.0'
14+
gem 'shoulda-context', RUBY_VERSION < '1.9' ? '= 1.2.1' : '>= 1.2.1'
15+
gem 'test-unit', RUBY_VERSION < '1.9' ? '~> 2.0' : '>= 3.0'
16+
gem 'json', '>= 1.8' if RUBY_VERSION < '1.9'
17+
gem 'rdoc', RUBY_VERSION < '1.9' ? '~> 4.2.2' : '>= 4.2.2'
1818
end

lib/coderay/scanners/java.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ class Java < Scanner
4444
'"' => /[^\\"]+/,
4545
'/' => /[^\\\/]+/,
4646
} # :nodoc:
47-
IDENT = /[[[:alpha:]]_][[[:alnum:]]_]*/ # :nodoc:
47+
IDENT = RUBY_VERSION < '1.9' ? /[a-zA-Z_][A-Za-z_0-9]*/ : /[[[:alpha:]]_][[[:alnum:]]_]*/ # :nodoc:
4848

4949
protected
5050

0 commit comments

Comments
 (0)