Skip to content

Commit 2ca8b45

Browse files
Merge pull request #37 from basecamp/lb/ruby-3
Ruby 3
2 parents 7a4db37 + 3665cd6 commit 2ca8b45

File tree

6 files changed

+17
-5
lines changed

6 files changed

+17
-5
lines changed

.github/workflows/build.yml

+2-1
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,7 @@ jobs:
2121
runs-on: ubuntu-latest
2222
strategy:
2323
matrix:
24+
ruby-version: [2.7.2, 3.0.2]
2425
database: [sqlite, postgres, mysql]
2526
services:
2627
redis:
@@ -47,7 +48,7 @@ jobs:
4748
- name: Setup Ruby and install gems
4849
uses: ruby/setup-ruby@v1
4950
with:
50-
ruby-version: 2.7.2
51+
ruby-version: ${{ matrix.ruby-version }}
5152
bundler-cache: true
5253
- name: Setup test database
5354
run: |

Gemfile.lock

+1-1
Original file line numberDiff line numberDiff line change
@@ -87,7 +87,7 @@ GIT
8787
PATH
8888
remote: .
8989
specs:
90-
console1984 (0.1.18)
90+
console1984 (0.1.19)
9191
colorize
9292
parser
9393

console1984.gemspec

+1
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@ Gem::Specification.new do |spec|
1212
spec.homepage = 'http://github.com/basecamp/console1984'
1313
spec.summary = 'Your Rails console, 1984 style'
1414
spec.license = 'MIT'
15+
spec.required_ruby_version = '>= 2.7.0'
1516

1617
# Prevent pushing this gem to RubyGems.org. To allow pushes either set the 'allowed_push_host'
1718
# to allow pushing to a single host or delete this section to allow pushing to any host.

lib/console1984/ext/socket/tcp_socket.rb

+2-2
Original file line numberDiff line numberDiff line change
@@ -2,13 +2,13 @@
22
module Console1984::Ext::Socket::TcpSocket
33
include Console1984::Freezeable
44

5-
def write(*args)
5+
def write(...)
66
protecting do
77
super
88
end
99
end
1010

11-
def write_nonblock(*args)
11+
def write_nonblock(...)
1212
protecting do
1313
super
1414
end

lib/console1984/version.rb

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
module Console1984
2-
VERSION = '0.1.18'
2+
VERSION = '0.1.19'
33
end

test/ext/socket/tcp_socket_test.rb

+10
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
require "test_helper"
2+
3+
class TCPSocketTest < ActiveSupport::TestCase
4+
test "doesn't raise when forwarding kwargs" do
5+
assert_nothing_raised do
6+
socket = TCPSocket.new("localhost", 6379)
7+
socket.write_nonblock "content", exception: false
8+
end
9+
end
10+
end

0 commit comments

Comments
 (0)