Skip to content

Commit

Permalink
ARROW-7959: [Ruby] Add support for Ruby 2.3 again
Browse files Browse the repository at this point in the history
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:

f320181 <Sutou Kouhei>  Add support for Ruby 2.3 again

Authored-by: Sutou Kouhei <kou@clear-code.com>
Signed-off-by: Yosuke Shiro <yosuke.shiro615@gmail.com>
  • Loading branch information
kou authored and shiro615 committed Feb 28, 2020
1 parent c7a7d2d commit 5e3255b
Show file tree
Hide file tree
Showing 6 changed files with 11 additions and 8 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/cpp.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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++
Expand Down
5 changes: 4 additions & 1 deletion .github/workflows/ruby.yml
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,9 @@ jobs:
strategy:
fail-fast: false
matrix:
ubuntu: [18.04]
ubuntu:
- 16.04
- 18.04
env:
UBUNTU: ${{ matrix.ubuntu }}
steps:
Expand Down Expand Up @@ -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:
Expand Down
2 changes: 1 addition & 1 deletion c_glib/test/test-numeric-array.rb
Original file line number Diff line number Diff line change
Expand Up @@ -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
4 changes: 2 additions & 2 deletions ruby/red-arrow/lib/arrow/generic-filterable.rb
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down
4 changes: 2 additions & 2 deletions ruby/red-arrow/lib/arrow/generic-takeable.rb
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down
2 changes: 1 addition & 1 deletion ruby/red-arrow/lib/arrow/null-array-builder.rb
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 5e3255b

Please sign in to comment.