1 |
graaff 15/06/24 05:37:27 |
2 |
|
3 |
Added: gherkin-2.12.2-ruby21.patch |
4 |
Log: |
5 |
Version bump. Add ruby22. |
6 |
|
7 |
(Portage version: 2.2.18/cvs/Linux x86_64, signed Manifest commit with key 0x8883FA56A308A8D7!) |
8 |
|
9 |
Revision Changes Path |
10 |
1.1 dev-ruby/gherkin/files/gherkin-2.12.2-ruby21.patch |
11 |
|
12 |
file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/dev-ruby/gherkin/files/gherkin-2.12.2-ruby21.patch?rev=1.1&view=markup |
13 |
plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/dev-ruby/gherkin/files/gherkin-2.12.2-ruby21.patch?rev=1.1&content-type=text/plain |
14 |
|
15 |
Index: gherkin-2.12.2-ruby21.patch |
16 |
=================================================================== |
17 |
commit 021309d273960bb5625f8072b8366eab7d077d25 |
18 |
Author: Cédric Boutillier <boutil@××××××.org> |
19 |
Date: Fri Apr 25 13:34:41 2014 +0200 |
20 |
|
21 |
change regexp matchin Ruby versions to support Ruby2.1 |
22 |
|
23 |
diff --git a/lib/gherkin/formatter/pretty_formatter.rb b/lib/gherkin/formatter/pretty_formatter.rb |
24 |
index 28c8b54..ff13c70 100644 |
25 |
--- a/lib/gherkin/formatter/pretty_formatter.rb |
26 |
+++ b/lib/gherkin/formatter/pretty_formatter.rb |
27 |
@@ -199,7 +199,7 @@ module Gherkin |
28 |
end |
29 |
end |
30 |
|
31 |
- if(RUBY_VERSION =~ /^1\.9|2\.0/) |
32 |
+ if(RUBY_VERSION =~ /^(1\.9|2\.)/) |
33 |
START = /#{'^'.encode('UTF-8')}/ |
34 |
TRIPLE_QUOTES = /#{'"""'.encode('UTF-8')}/ |
35 |
else |
36 |
diff --git a/ragel/lexer.rb.rl.erb b/ragel/lexer.rb.rl.erb |
37 |
index 7fd85b4..4be053e 100644 |
38 |
--- a/ragel/lexer.rb.rl.erb |
39 |
+++ b/ragel/lexer.rb.rl.erb |
40 |
@@ -165,7 +165,7 @@ module Gherkin |
41 |
utf8_pack(rest[0..rest.index(10)||-1]).strip # 10 is \n |
42 |
end |
43 |
|
44 |
- if (RUBY_VERSION =~ /^1\.9|2\.0/) |
45 |
+ if (RUBY_VERSION =~ /^(1\.9|2\.)/) |
46 |
def utf8_pack(array) |
47 |
array.pack("c*").force_encoding("UTF-8") |
48 |
end |
49 |
diff --git a/spec/spec_helper.rb b/spec/spec_helper.rb |
50 |
index 72333a7..0f6e3ae 100644 |
51 |
--- a/spec/spec_helper.rb |
52 |
+++ b/spec/spec_helper.rb |
53 |
@@ -6,6 +6,6 @@ def silence_warnings(&block) |
54 |
-if RUBY_VERSION =~ /1\.9|2\.0/ |
55 |
+if RUBY_VERSION =~ /^(1\.9|2\.)/ |
56 |
silence_warnings do |
57 |
Encoding.default_external = Encoding::UTF_8 |
58 |
Encoding.default_internal = Encoding::UTF_8 |
59 |
end |
60 |
end |