|
|
3322d9 |
From 4a986d3a8f3cc4bfeacf1c1def3c6375c4866dfe Mon Sep 17 00:00:00 2001
|
|
|
3322d9 |
From: =?UTF-8?q?V=C3=ADt=20Ondruch?= <vondruch@redhat.com>
|
|
|
3322d9 |
Date: Mon, 23 Jun 2014 14:25:16 +0200
|
|
|
3322d9 |
Subject: [PATCH] Add support for Ruby 2.1.
|
|
|
3322d9 |
|
|
|
3322d9 |
---
|
|
|
3322d9 |
test/test-main.rb | 2 +-
|
|
|
3322d9 |
test/test-users-guide.rb | 2 +-
|
|
|
3322d9 |
test/testutil.rb | 4 ++++
|
|
|
3322d9 |
3 files changed, 6 insertions(+), 2 deletions(-)
|
|
|
3322d9 |
|
|
|
3322d9 |
diff --git a/test/test-main.rb b/test/test-main.rb
|
|
|
3322d9 |
index e4d6c2a..9dbe12e 100644
|
|
|
3322d9 |
--- a/test/test-main.rb
|
|
|
3322d9 |
+++ b/test/test-main.rb
|
|
|
3322d9 |
@@ -273,7 +273,7 @@ END
|
|
|
3322d9 |
errmsgs << <<'END'
|
|
|
3322d9 |
7: syntax error, unexpected $end, expecting keyword_end
|
|
|
3322d9 |
END
|
|
|
3322d9 |
- elsif ruby20?
|
|
|
3322d9 |
+ elsif ruby20? || ruby21?
|
|
|
3322d9 |
errmsgs << <<'END'
|
|
|
3322d9 |
3: syntax error, unexpected ']', expecting ')'
|
|
|
3322d9 |
_buf << ' '; _buf << ( item[:name]] ).to_s; _buf << '
|
|
|
3322d9 |
diff --git a/test/test-users-guide.rb b/test/test-users-guide.rb
|
|
|
3322d9 |
index b89706b..fee5435 100644
|
|
|
3322d9 |
--- a/test/test-users-guide.rb
|
|
|
3322d9 |
+++ b/test/test-users-guide.rb
|
|
|
3322d9 |
@@ -28,7 +28,7 @@ class KwarkUsersGuideTest < Test::Unit::TestCase
|
|
|
3322d9 |
s =~ /\A\$ (.*?)\n/
|
|
|
3322d9 |
command = $1
|
|
|
3322d9 |
expected = $'
|
|
|
3322d9 |
- if ruby19? || ruby20?
|
|
|
3322d9 |
+ if ruby19? || ruby20? || ruby21?
|
|
|
3322d9 |
case @name
|
|
|
3322d9 |
when 'test_main_program1_result'
|
|
|
3322d9 |
expected.sub!('["eruby", "items", "x", "_buf"]', '[:_buf, :eruby, :items, :x]')
|
|
|
3322d9 |
diff --git a/test/testutil.rb b/test/testutil.rb
|
|
|
3322d9 |
index 59c3779..1b841c3 100644
|
|
|
3322d9 |
--- a/test/testutil.rb
|
|
|
3322d9 |
+++ b/test/testutil.rb
|
|
|
3322d9 |
@@ -21,6 +21,10 @@ def ruby20? # :nodoc:
|
|
|
3322d9 |
RUBY_VERSION =~ /\A2.0/
|
|
|
3322d9 |
end
|
|
|
3322d9 |
|
|
|
3322d9 |
+def ruby21? # :nodoc:
|
|
|
3322d9 |
+ RUBY_VERSION =~ /\A2.1/
|
|
|
3322d9 |
+end
|
|
|
3322d9 |
+
|
|
|
3322d9 |
def rubinius? # :nodoc:
|
|
|
3322d9 |
defined?(RUBY_ENGINE) && RUBY_ENGINE == "rbx"
|
|
|
3322d9 |
end
|
|
|
3322d9 |
--
|
|
|
3322d9 |
1.9.0
|
|
|
3322d9 |
|