You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@avro.apache.org by bu...@apache.org on 2017/04/12 03:37:12 UTC

[2/3] avro git commit: AVRO-1782. Ruby: Fix unit test failures in new versions of Ruby.

AVRO-1782. Ruby: Fix unit test failures in new versions of Ruby.

git-svn-id: https://svn.apache.org/repos/asf/avro/branches/branch-1.8@1724507 13f79535-47bb-0310-9956-ffa450edef68
(cherry picked from commit a7a547cb8a3b7bb16531ef956b81c663c197fe75)


Project: http://git-wip-us.apache.org/repos/asf/avro/repo
Commit: http://git-wip-us.apache.org/repos/asf/avro/commit/c235b4c8
Tree: http://git-wip-us.apache.org/repos/asf/avro/tree/c235b4c8
Diff: http://git-wip-us.apache.org/repos/asf/avro/diff/c235b4c8

Branch: refs/heads/branch-1.7
Commit: c235b4c81a9ea3a769854838af0329130e692e26
Parents: ff2c83f
Author: Martin Kleppmann <ma...@apache.org>
Authored: Wed Jan 13 20:32:45 2016 +0000
Committer: Sean Busbey <bu...@apache.org>
Committed: Tue Apr 11 22:36:11 2017 -0500

----------------------------------------------------------------------
 CHANGES.txt                                |  2 ++
 lang/ruby/lib/avro/schema_normalization.rb |  2 +-
 lang/ruby/test/case_finder.rb              | 20 ++++++++++++++++++++
 3 files changed, 23 insertions(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/avro/blob/c235b4c8/CHANGES.txt
----------------------------------------------------------------------
diff --git a/CHANGES.txt b/CHANGES.txt
index c8fdaa0..ff4128f 100644
--- a/CHANGES.txt
+++ b/CHANGES.txt
@@ -38,6 +38,8 @@ Trunk (not yet released)
 
     AVRO-1688. Ruby test_union(TestIO) is failing. (tomwhite)
 
+    AVRO-1782. Ruby: Fix unit test failures in new versions of Ruby. (martinkl)
+
 Avro 1.7.7 (23 July 2014)
 
   NEW FEATURES

http://git-wip-us.apache.org/repos/asf/avro/blob/c235b4c8/lang/ruby/lib/avro/schema_normalization.rb
----------------------------------------------------------------------
diff --git a/lang/ruby/lib/avro/schema_normalization.rb b/lang/ruby/lib/avro/schema_normalization.rb
index 0a5bee5..1506fca 100644
--- a/lang/ruby/lib/avro/schema_normalization.rb
+++ b/lang/ruby/lib/avro/schema_normalization.rb
@@ -25,7 +25,7 @@ module Avro
     end
 
     def to_parsing_form(schema)
-      JSON.dump(normalize_schema(schema))
+      MultiJson.dump(normalize_schema(schema))
     end
 
     private

http://git-wip-us.apache.org/repos/asf/avro/blob/c235b4c8/lang/ruby/test/case_finder.rb
----------------------------------------------------------------------
diff --git a/lang/ruby/test/case_finder.rb b/lang/ruby/test/case_finder.rb
index eb5424a..a666f33 100644
--- a/lang/ruby/test/case_finder.rb
+++ b/lang/ruby/test/case_finder.rb
@@ -1,3 +1,23 @@
+#
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements.  See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership.  The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License.  You may obtain a copy of the License at
+#
+#   http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied.  See the License for the
+# specific language governing permissions and limitations
+# under the License.
+#
+require 'strscan'
+
 class CaseFinder
   PATH = File.expand_path("../../../../share/test/data/schema-tests.txt", __FILE__)