java_regex 0.0.1 → 0.0.2
Sign up to get free protection for your applications and to get access to all the features.
- data/lib/java_regex/translator.rb +1 -4
- metadata +2 -2
@@ -26,10 +26,7 @@ class JavaRegex::Translator
|
|
26
26
|
end
|
27
27
|
|
28
28
|
def self.character_classes_or_character_sets(regex)
|
29
|
-
|
30
|
-
raise JavaRegexException::TranslationError,
|
31
|
-
'Literal hyphens like [\d-z] are not supported' unless
|
32
|
-
literal_hyphen.empty?
|
29
|
+
regex.gsub!(/(\[\\.)-(.\])/, '\1\\-\2')
|
33
30
|
end
|
34
31
|
|
35
32
|
def self.word_boundaries(regex)
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: java_regex
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.2
|
5
5
|
prerelease:
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
@@ -9,7 +9,7 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date: 2013-
|
12
|
+
date: 2013-04-01 00:00:00.000000000 Z
|
13
13
|
dependencies: []
|
14
14
|
description: ! " For the most common cases, either converts to the Ruby equivalent,
|
15
15
|
or\n throws an exception if conversion is not supported.\n"
|