You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@arrow.apache.org by sh...@apache.org on 2020/02/28 11:49:07 UTC
[arrow] branch master updated: ARROW-7959: [Ruby] Add support for
Ruby 2.3 again
This is an automated email from the ASF dual-hosted git repository.
shiro pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/arrow.git
The following commit(s) were added to refs/heads/master by this push:
new 5e3255b ARROW-7959: [Ruby] Add support for Ruby 2.3 again
5e3255b is described below
commit 5e3255b1499c3d504139998365e6cc3e57f118d6
Author: Sutou Kouhei <ko...@clear-code.com>
AuthorDate: Fri Feb 28 20:48:36 2020 +0900
ARROW-7959: [Ruby] Add support for Ruby 2.3 again
Ruby 2.3 reached EOL but Ubuntu 16.04 LTS ships Ruby 2.3. So
supporting Ruby 2.3 again is valuable.
Note that Red Arrow 0.15.1 works with Ruby 2.3.
Closes #6501 from kou/ruby-add-support-for-ruby-2.3 and squashes the following commits:
f32018120 <Sutou Kouhei> Add support for Ruby 2.3 again
Authored-by: Sutou Kouhei <ko...@clear-code.com>
Signed-off-by: Yosuke Shiro <yo...@gmail.com>
---
.github/workflows/cpp.yml | 2 +-
.github/workflows/ruby.yml | 5 ++++-
c_glib/test/test-numeric-array.rb | 2 +-
ruby/red-arrow/lib/arrow/generic-filterable.rb | 4 ++--
ruby/red-arrow/lib/arrow/generic-takeable.rb | 4 ++--
ruby/red-arrow/lib/arrow/null-array-builder.rb | 2 +-
6 files changed, 11 insertions(+), 8 deletions(-)
diff --git a/.github/workflows/cpp.yml b/.github/workflows/cpp.yml
index 63ba695..ae694c1 100644
--- a/.github/workflows/cpp.yml
+++ b/.github/workflows/cpp.yml
@@ -93,7 +93,7 @@ jobs:
run: |
docker login -u ${{ secrets.DOCKERHUB_USER }} \
-p ${{ secrets.DOCKERHUB_TOKEN }}
- docker-compose push ubuntu-cpp
+ docker-compose push ubuntu-cpp-sanitizer
macos:
name: AMD64 MacOS 10.15 C++
diff --git a/.github/workflows/ruby.yml b/.github/workflows/ruby.yml
index 0282f49..d5e3e59 100644
--- a/.github/workflows/ruby.yml
+++ b/.github/workflows/ruby.yml
@@ -41,7 +41,9 @@ jobs:
strategy:
fail-fast: false
matrix:
- ubuntu: [18.04]
+ ubuntu:
+ - 16.04
+ - 18.04
env:
UBUNTU: ${{ matrix.ubuntu }}
steps:
@@ -71,6 +73,7 @@ jobs:
run: |
docker login -u ${{ secrets.DOCKERHUB_USER }} \
-p ${{ secrets.DOCKERHUB_TOKEN }}
+ docker-compose push ubuntu-c-glib
docker-compose push ubuntu-ruby
macos:
diff --git a/c_glib/test/test-numeric-array.rb b/c_glib/test/test-numeric-array.rb
index d919d59..f90007c 100644
--- a/c_glib/test/test-numeric-array.rb
+++ b/c_glib/test/test-numeric-array.rb
@@ -20,7 +20,7 @@ class TestNumericArray < Test::Unit::TestCase
def test_mean
array = build_double_array([1.1, 2.2, nil])
- assert_in_delta(array.values.sum / 2,
+ assert_in_delta(array.values.inject(&:+) / 2,
array.mean)
end
end
diff --git a/ruby/red-arrow/lib/arrow/generic-filterable.rb b/ruby/red-arrow/lib/arrow/generic-filterable.rb
index 9e0ba55..4fd5c87 100644
--- a/ruby/red-arrow/lib/arrow/generic-filterable.rb
+++ b/ruby/red-arrow/lib/arrow/generic-filterable.rb
@@ -19,8 +19,8 @@ module Arrow
module GenericFilterable
class << self
def included(base)
- base.alias_method :filter_raw, :filter
- base.alias_method :filter, :filter_generic
+ base.__send__(:alias_method, :filter_raw, :filter)
+ base.__send__(:alias_method, :filter, :filter_generic)
end
end
diff --git a/ruby/red-arrow/lib/arrow/generic-takeable.rb b/ruby/red-arrow/lib/arrow/generic-takeable.rb
index 3aa63dde..f32b43f 100644
--- a/ruby/red-arrow/lib/arrow/generic-takeable.rb
+++ b/ruby/red-arrow/lib/arrow/generic-takeable.rb
@@ -19,8 +19,8 @@ module Arrow
module GenericTakeable
class << self
def included(base)
- base.alias_method :take_raw, :take
- base.alias_method :take, :take_generic
+ base.__send__(:alias_method, :take_raw, :take)
+ base.__send__(:alias_method, :take, :take_generic)
end
end
diff --git a/ruby/red-arrow/lib/arrow/null-array-builder.rb b/ruby/red-arrow/lib/arrow/null-array-builder.rb
index 01b7604..26e58cc 100644
--- a/ruby/red-arrow/lib/arrow/null-array-builder.rb
+++ b/ruby/red-arrow/lib/arrow/null-array-builder.rb
@@ -19,7 +19,7 @@ module Arrow
class NullArrayBuilder
class << self
def buildable?(args)
- super and args.collect(&:class) != [Integer]
+ super and not (args.size == 1 and args[0].is_a?(Integer))
end
end
end