Skip to content
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: socketry/nio4r
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: v2.5.1
Choose a base ref
...
head repository: socketry/nio4r
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: v2.5.3
Choose a head ref

Commits on Aug 28, 2019

  1. Update README.md

    Fix wrapping.
    ioquatix authored Aug 28, 2019
    Copy the full SHA
    cd4d0f9 View commit details

Commits on Sep 12, 2019

  1. Add project metadata to the gemspec

    As per https://guides.rubygems.org/specification-reference/#metadata,
    add metadata to the gemspec file. This'll allow people to more easily
    access the source code, raise issues and read the changelog. These
    `bug_tracker_uri`, `changelog_uri`, `documentation_uri`, `wiki_uri` and
    `source_code_uri` links will appear on the rubygems page at
    https://rubygems.org/gems/nio4r and be available via the rubygems API
    after the next release.
    orien authored and ioquatix committed Sep 12, 2019

    Verified

    This commit was created on github.com and signed with GitHub’s verified signature. The key has expired.
    Copy the full SHA
    7a3d634 View commit details

Commits on Sep 24, 2019

  1. Detect aio_abi.h and define EV_USE_LINUXAIO if present.

    This avoids the need to have kernel headers installed. Fixes #225.
    ioquatix committed Sep 24, 2019

    Verified

    This commit was created on github.com and signed with GitHub’s verified signature. The key has expired.
    Copy the full SHA
    0e82096 View commit details
  2. Fix ev_backend_poll so that it doesn't generate warnings.

    `rb_thread_call_without_gvl` expects return type `void*`. Fixes #220.
    ioquatix committed Sep 24, 2019
    Copy the full SHA
    a0b368f View commit details
  3. Replace usage of long with size_t in memory allocation functions.

    Improve compatibility of `ruby_xrealloc`. Fixes #220.
    ioquatix committed Sep 24, 2019
    Copy the full SHA
    f171273 View commit details
  4. Bump version.

    ioquatix committed Sep 24, 2019
    3
    Copy the full SHA
    7f16282 View commit details
  5. RuboCop...........

    ioquatix committed Sep 24, 2019
    Copy the full SHA
    6678b72 View commit details
  6. Copy the full SHA
    f4f0a72 View commit details

Commits on Sep 25, 2019

  1. Update CHANGES.md

    ioquatix authored Sep 25, 2019
    Copy the full SHA
    d3a23fb View commit details
  2. Update CHANGES.md

    ioquatix authored Sep 25, 2019
    Copy the full SHA
    72e492a View commit details

Commits on Nov 19, 2019

  1. Polish examples/echo_server.rb

    ```ruby
      def run
        loop do
          @selector.select { |monitor| monitor.value.call(monitor) }
        end
      end
    ```
    The argument `monitor` seems useless.
    Zhang Kang authored and ioquatix committed Nov 19, 2019
    Copy the full SHA
    7992293 View commit details

Commits on Jan 8, 2020

  1. CI: Add 2.7 to the matrix

    olleolleolle authored and ioquatix committed Jan 8, 2020
    Copy the full SHA
    b7d41d5 View commit details

Commits on Jan 10, 2020

  1. bump rubocop to 0.74.0

    thomasdziedzic authored and ioquatix committed Jan 10, 2020
    Copy the full SHA
    631ca2f View commit details
  2. Fix Style/ExpandPathArguments

    examples/echo_server.rb:4:22: C: Style/ExpandPathArguments: Use expand_path('../lib', __dir__) instead of expand_path('../../lib', __FILE__).
    $LOAD_PATH.push File.expand_path("../../lib", __FILE__)
                         ^^^^^^^^^^^
    thomasdziedzic authored and ioquatix committed Jan 10, 2020
    Copy the full SHA
    22760ae View commit details
  3. Fix Layout/EmptyLineAfterGuardClause

    lib/nio/bytebuffer.rb:26:7: C: Layout/EmptyLineAfterGuardClause: Add empty line after guard clause.
          raise TypeError, "no implicit conversion of #{capacity.class} to Integer" unless capacity.is_a?(Integer)
          ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
    lib/nio/bytebuffer.rb:121:7: C: Layout/EmptyLineAfterGuardClause: Add empty line after guard clause.
          raise TypeError, "expected String, got #{str.class}" unless str.respond_to?(:to_str)
          ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
    lib/nio/bytebuffer.rb:124:7: C: Layout/EmptyLineAfterGuardClause: Add empty line after guard clause.
          raise OverflowError, "buffer is full" if str.length > @limit - @position
          ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
    lib/nio/bytebuffer.rb:190:7: C: Layout/EmptyLineAfterGuardClause: Add empty line after guard clause.
          raise MarkUnsetError, "mark has not been set" unless @mark
          ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
    thomasdziedzic authored and ioquatix committed Jan 10, 2020
    Copy the full SHA
    cd8d391 View commit details
  4. Fix Style/ExpandPathArguments

    nio4r.gemspec:3:14: C: Style/ExpandPathArguments: Use expand_path('lib/nio/version', __dir__) instead of expand_path('../lib/nio/version', __FILE__).
    require File.expand_path("../lib/nio/version", __FILE__)
                 ^^^^^^^^^^^
    thomasdziedzic authored and ioquatix committed Jan 10, 2020
    Copy the full SHA
    03b2d2e View commit details
  5. disable Layout/AlignHash

    thomasdziedzic authored and ioquatix committed Jan 10, 2020
    Copy the full SHA
    aa67620 View commit details
  6. Fix Lint/UnneededCopEnableDirective

    spec/nio/selector_spec.rb:237:18: W: Lint/UnneededCopEnableDirective: Unnecessary enabling of Metrics/BlockLength.
    \# rubocop:enable Metrics/BlockLength
                     ^^^^^^^^^^^^^^^^^^^
    thomasdziedzic authored and ioquatix committed Jan 10, 2020
    Copy the full SHA
    25b3cff View commit details
  7. Fix Naming/RescuedExceptionsVariableName

    spec/nio/selectables/udp_socket_spec.rb:36:35: C: Naming/RescuedExceptionsVariableName: Use e instead of ex.
        rescue Errno::ECONNREFUSED => ex
                                      ^^
    thomasdziedzic authored and ioquatix committed Jan 10, 2020
    Copy the full SHA
    b106b2f View commit details
  8. Fix Lint/UnneededCopEnableDirective

    spec/nio/selector_spec.rb:237:18: W: Lint/UnneededCopEnableDirective: Unnecessary enabling of Metrics/BlockLength.
    \# rubocop:enable Metrics/BlockLength
                     ^^^^^^^^^^^^^^^^^^^
    thomasdziedzic authored and ioquatix committed Jan 10, 2020
    Copy the full SHA
    fa3fe9e View commit details
  9. Copy the full SHA
    bd82cda View commit details

Commits on Feb 1, 2020

  1. Copy the full SHA
    4f37324 View commit details
  2. Copy the full SHA
    909641d View commit details
  3. Copy the full SHA
    cb92501 View commit details
  4. Copy the full SHA
    81e41e5 View commit details
  5. Merge pull request #234 from MSP-Greg/add-actions

    Add Actions CI, remove redundant Travis & AppVeyor jobs
    tarcieri authored Feb 1, 2020
    Copy the full SHA
    ab0f096 View commit details

Commits on Feb 7, 2020

  1. Add ruby 2.7

    elad-eyal authored and ioquatix committed Feb 7, 2020
    Copy the full SHA
    ce97bfe View commit details

Commits on Mar 5, 2020

  1. Copy the full SHA
    816d05c View commit details
  2. Copy the full SHA
    f42e8c9 View commit details

Commits on Apr 28, 2020

  1. CI: Exclude TruffleRuby on Windows

    eregon authored and ioquatix committed Apr 28, 2020
    Copy the full SHA
    0850552 View commit details
  2. Use truffleruby-head in CI

    * To get the latest fixes until there is a release passing all specs.
    eregon authored and ioquatix committed Apr 28, 2020
    Copy the full SHA
    ee16684 View commit details

Commits on May 2, 2020

  1. Bumb Rubocop to 0.82.0

    vsppedro authored and ioquatix committed May 2, 2020
    Copy the full SHA
    af9f0a4 View commit details
  2. Copy the full SHA
    02ad565 View commit details
  3. Fix warning: The Lint/HandleExceptions cop has been renamed to `Lin…

    …t/SuppressedException`.
    vsppedro authored and ioquatix committed May 2, 2020
    Copy the full SHA
    1afcba0 View commit details
  4. Update rubocop version to 2.4

    Version 2.3 is no longer supported
    vsppedro authored and ioquatix committed May 2, 2020
    Copy the full SHA
    4718c30 View commit details
  5. Copy the full SHA
    cd63e17 View commit details
  6. Copy the full SHA
    5c69a73 View commit details
  7. Fix warning: Use result.unpack1("i") instead of `result.unpack("i")…

    ….first`. (convention:Style/UnpackFirst)
    vsppedro authored and ioquatix committed May 2, 2020
    Copy the full SHA
    6c9ec5e View commit details

Commits on Jul 4, 2020

  1. Fixes for use when OpenSSL is not loaded

    Code in NIO::Monitor and NIO::Selector assumes OpenSSL is loaded, and raises if it isn't.
    
    Fix so OpenSSL isn't required.  User must require it if processing SSLSockets.
    MSP-Greg authored and ioquatix committed Jul 4, 2020
    Copy the full SHA
    6c6bf29 View commit details
  2. Copy the full SHA
    fec282c View commit details
  3. Fix Actions CI for macOS

    MSP-Greg authored and ioquatix committed Jul 4, 2020
    Copy the full SHA
    8aa37f3 View commit details

Commits on Sep 5, 2020

  1. fix for #241

    This should fix the dangling pointer issue caused by `GC.compact` moving the monitor object's memory address to a new location.
    boazsegev authored and ioquatix committed Sep 5, 2020
    Copy the full SHA
    507c199 View commit details

Commits on Sep 7, 2020

  1. Copy the full SHA
    efd35cc View commit details
  2. Copy the full SHA
    30b069c View commit details
  3. Bump version.

    ioquatix committed Sep 7, 2020
    Copy the full SHA
    37445cb View commit details
43 changes: 43 additions & 0 deletions .github/workflows/workflow.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
name: nio4r

on: [push, pull_request]

jobs:
build:
name: >-
${{matrix.os}}, ${{matrix.ruby}}
env:
CI: true
TESTOPTS: -v

runs-on: ${{matrix.os}}
strategy:
fail-fast: false
matrix:
os: [ubuntu-16.04, ubuntu-18.04, macos-latest, windows-latest]
ruby: [2.4, 2.5, 2.6, 2.7, jruby, truffleruby-head]
exclude:
- { os: windows-latest, ruby: jruby }
- { os: windows-latest, ruby: truffleruby-head }

steps:
- name: repo checkout
uses: actions/checkout@v2

- name: load ruby
uses: ruby/setup-ruby@v1
with:
ruby-version: ${{matrix.ruby}}

- name: RubyGems, Bundler Update
run: gem update --system --no-document --conservative

- name: bundle install
run: bundle install --path .bundle/gems --without development

- name: compile
run: bundle exec rake compile

- name: test
run: bundle exec rake spec
timeout-minutes: 10
41 changes: 30 additions & 11 deletions .rubocop.yml
Original file line number Diff line number Diff line change
@@ -1,23 +1,40 @@
AllCops:
TargetRubyVersion: 2.3
TargetRubyVersion: 2.4
DisplayCopNames: true

Layout/HashAlignment:
Enabled: false

Layout/LineLength:
Max: 128

Layout/SpaceAroundMethodCallOperator:
Enabled: false

Layout/SpaceInsideBlockBraces:
Enabled: false

Style/IfUnlessModifier:
Enabled: false

Style/UnpackFirst:
Enabled: false

#
# Lint
#

Lint/HandleExceptions:
Lint/SuppressedException:
Enabled: false

Lint/Loop:
Enabled: false

Lint/RaiseException:
Enabled: false

Lint/StructNewOverride:
Enabled: false
#
# Metrics
#
@@ -32,9 +49,6 @@ Metrics/BlockLength:
Metrics/ClassLength:
Max: 128

Metrics/LineLength:
Max: 128

Metrics/MethodLength:
CountComments: false
Max: 50
@@ -46,16 +60,12 @@ Metrics/PerceivedComplexity:
Max: 15

#
# Performance
# Style
#

Performance/RegexpMatch:
Style/ExponentialNotation:
Enabled: false

#
# Style
#

Style/FormatStringToken:
Enabled: false

@@ -65,6 +75,15 @@ Style/FrozenStringLiteralComment:
Style/GlobalVars:
Enabled: false

Style/HashEachMethods:
Enabled: false

Style/HashTransformKeys:
Enabled: false

Style/HashTransformValues:
Enabled: false

Style/NumericPredicate:
Enabled: false

44 changes: 0 additions & 44 deletions .travis.yml

This file was deleted.

19 changes: 18 additions & 1 deletion CHANGES.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,19 @@
## 2.5.3 (2020-09-07)

* [#241](https://github.com/socketry/nio4r/issues/241)
Possible bug with Ruby >= 2.7.0 and `GC.compact`.
([@boazsegev])

## 2.5.2 (2019-09-24)

* [#220](https://github.com/socketry/nio4r/issues/220)
Update to libev-4.27 & fix assorted warnings.
([@ioquatix])

* [#225](https://github.com/socketry/nio4r/issues/225)
Avoid need for linux headers.
([@ioquatix])

## 2.4.0 (2019-07-07)

* [#211](https://github.com/socketry/nio4r/pull/211)
@@ -9,7 +25,7 @@

* Assorted fixes for TruffleRuby & JRuby.
([@eregon], [@olleolleolle])

Possible bug with Ruby >= 2.7.0 and `GC.compact`
* Update libev to v4.25.
([@ioquatix])

@@ -242,3 +258,4 @@
[@ioquatix]: https://github.com/ioquatix
[@eregon]: https://github.com/eregon
[@olleolleolle]: https://github.com/olleolleolle
[@boazsegev]: https://github.com/boazsegev
2 changes: 1 addition & 1 deletion Gemfile
Original file line number Diff line number Diff line change
@@ -15,5 +15,5 @@ group :development, :test do
gem "coveralls", require: false
gem "rake-compiler", require: false
gem "rspec", "~> 3.7", require: false
gem "rubocop", "0.52.1", require: false
gem "rubocop", "0.82.0", require: false
end
3 changes: 2 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -47,6 +47,7 @@ writing.
* Ruby 2.4
* Ruby 2.5
* Ruby 2.6
* Ruby 2.7
* [JRuby](https://github.com/jruby/jruby)
* [TruffleRuby](https://github.com/oracle/truffleruby)

@@ -120,7 +121,7 @@ rake release

Released under the MIT license.

Copyright, 2019, by Tony Arcieri.
Copyright, 2019, by Tony Arcieri.
Copyright, 2019, by [Samuel G. D. Williams](http://www.codeotaku.com/samuel-williams).

Permission is hereby granted, free of charge, to any person obtaining a copy
40 changes: 0 additions & 40 deletions appveyor.yml

This file was deleted.

4 changes: 2 additions & 2 deletions examples/echo_server.rb
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
#!/usr/bin/env ruby
# frozen_string_literal: true

$LOAD_PATH.push File.expand_path("../../lib", __FILE__)
$LOAD_PATH.push File.expand_path("../lib", __dir__)
require "nio"
require "socket"

@@ -19,7 +19,7 @@ def initialize(host, port)

def run
loop do
@selector.select { |monitor| monitor.value.call(monitor) }
@selector.select { |monitor| monitor.value.call }
end
end

24 changes: 11 additions & 13 deletions ext/libev/ev.c
Original file line number Diff line number Diff line change
@@ -335,14 +335,6 @@
# define EV_USE_PORT 0
#endif

#ifndef EV_USE_LINUXAIO
# if __linux /* libev currently assumes linux/aio_abi.h is always available on linux */
# define EV_USE_LINUXAIO 1
# else
# define EV_USE_LINUXAIO 0
# endif
#endif

#ifndef EV_USE_INOTIFY
# if __linux && (__GLIBC__ > 2 || (__GLIBC__ == 2 && __GLIBC_MINOR__ >= 4))
# define EV_USE_INOTIFY EV_FEATURE_OS
@@ -1754,7 +1746,7 @@ ev_syserr (const char *msg)
}

static void *
ev_realloc_emul (void *ptr, long size) EV_NOEXCEPT
ev_realloc_emul (void *ptr, size_t size) EV_NOEXCEPT
{
/* some systems, notably openbsd and darwin, fail to properly
* implement realloc (x, 0) (as required by both ansi c-89 and
@@ -1770,17 +1762,17 @@ ev_realloc_emul (void *ptr, long size) EV_NOEXCEPT
return 0;
}

static void *(*alloc)(void *ptr, long size) EV_NOEXCEPT = ev_realloc_emul;
static void *(*alloc)(void *ptr, size_t size) EV_NOEXCEPT = ev_realloc_emul;

ecb_cold
void
ev_set_allocator (void *(*cb)(void *ptr, long size) EV_NOEXCEPT) EV_NOEXCEPT
ev_set_allocator (void *(*cb)(void *ptr, size_t size) EV_NOEXCEPT) EV_NOEXCEPT
{
alloc = cb;
}

inline_speed void *
ev_realloc (void *ptr, long size)
ev_realloc (void *ptr, size_t size)
{
ptr = alloc (ptr, size);

@@ -2792,7 +2784,11 @@ ev_supported_backends (void) EV_NOEXCEPT
if (EV_USE_PORT ) flags |= EVBACKEND_PORT;
if (EV_USE_KQUEUE ) flags |= EVBACKEND_KQUEUE;
if (EV_USE_EPOLL ) flags |= EVBACKEND_EPOLL;

#ifdef EV_USE_LINUXAIO
if (EV_USE_LINUXAIO) flags |= EVBACKEND_LINUXAIO;
#endif

if (EV_USE_POLL ) flags |= EVBACKEND_POLL;
if (EV_USE_SELECT ) flags |= EVBACKEND_SELECT;

@@ -3636,11 +3632,13 @@ struct ev_poll_args {
};

static
VALUE ev_backend_poll(void *ptr)
void * ev_backend_poll(void *ptr)
{
struct ev_poll_args *args = (struct ev_poll_args *)ptr;
struct ev_loop *loop = args->loop;
backend_poll (EV_A_ args->waittime);

return NULL;
}
/* ######################################## */

2 changes: 1 addition & 1 deletion ext/libev/ev.h
Original file line number Diff line number Diff line change
@@ -544,7 +544,7 @@ EV_API_DECL void ev_sleep (ev_tstamp delay) EV_NOEXCEPT; /* sleep for a while */
* or take some potentially destructive action.
* The default is your system realloc function.
*/
EV_API_DECL void ev_set_allocator (void *(*cb)(void *ptr, long size) EV_NOEXCEPT) EV_NOEXCEPT;
EV_API_DECL void ev_set_allocator (void *(*cb)(void *ptr, size_t size) EV_NOEXCEPT) EV_NOEXCEPT;

/* set the callback function to call on a
* retryable syscall error
2 changes: 2 additions & 0 deletions ext/nio4r/extconf.rb
Original file line number Diff line number Diff line change
@@ -4,6 +4,7 @@

# Write a dummy Makefile on Windows because we use the pure Ruby implementation there
if Gem.win_platform?
require "devkit" if RUBY_PLATFORM.include?("mingw")
File.write("Makefile", "all install::\n")
File.write("nio4r_ext.so", "")
exit
@@ -13,6 +14,7 @@

have_header("unistd.h")

$defs << "-DEV_USE_LINUXAIO" if have_header("linux/aio_abi.h")
$defs << "-DEV_USE_SELECT" if have_header("sys/select.h")
$defs << "-DEV_USE_POLL" if have_type("port_event_t", "poll.h")
$defs << "-DEV_USE_EPOLL" if have_header("sys/epoll.h")
1 change: 1 addition & 0 deletions ext/nio4r/monitor.c
Original file line number Diff line number Diff line change
@@ -66,6 +66,7 @@ static VALUE NIO_Monitor_allocate(VALUE klass)

static void NIO_Monitor_mark(struct NIO_Monitor *monitor)
{
return rb_gc_mark(monitor->self);
}

static void NIO_Monitor_free(struct NIO_Monitor *monitor)
4 changes: 4 additions & 0 deletions lib/nio/bytebuffer.rb
Original file line number Diff line number Diff line change
@@ -24,6 +24,7 @@ class ByteBuffer
# @return [NIO::ByteBuffer]
def initialize(capacity)
raise TypeError, "no implicit conversion of #{capacity.class} to Integer" unless capacity.is_a?(Integer)

@capacity = capacity
clear
end
@@ -119,9 +120,11 @@ def [](index)
# @return [self]
def put(str)
raise TypeError, "expected String, got #{str.class}" unless str.respond_to?(:to_str)

str = str.to_str

raise OverflowError, "buffer is full" if str.length > @limit - @position

@buffer[@position...str.length] = str
@position += str.length
self
@@ -188,6 +191,7 @@ def mark
# @raise [NIO::ByteBuffer::MarkUnsetError] mark has not been set (call `#mark` first)
def reset
raise MarkUnsetError, "mark has not been set" unless @mark

@position = @mark
self
end
2 changes: 1 addition & 1 deletion lib/nio/monitor.rb
Original file line number Diff line number Diff line change
@@ -8,7 +8,7 @@ class Monitor

# :nodoc:
def initialize(io, interests, selector)
unless io.is_a? OpenSSL::SSL::SSLSocket
unless defined?(::OpenSSL) && io.is_a?(::OpenSSL::SSL::SSLSocket)
unless io.is_a?(IO)
if IO.respond_to? :try_convert
io = IO.try_convert(io)
2 changes: 1 addition & 1 deletion lib/nio/selector.rb
Original file line number Diff line number Diff line change
@@ -44,7 +44,7 @@ def backend
# * :w - is the IO writeable?
# * :rw - is the IO either readable or writeable?
def register(io, interest)
unless io.is_a? OpenSSL::SSL::SSLSocket
unless defined?(::OpenSSL) && io.is_a?(::OpenSSL::SSL::SSLSocket)
io = IO.try_convert(io)
end

2 changes: 1 addition & 1 deletion lib/nio/version.rb
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# frozen_string_literal: true

module NIO
VERSION = "2.5.1"
VERSION = "2.5.3"
end
12 changes: 10 additions & 2 deletions nio4r.gemspec
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# frozen_string_literal: true

require File.expand_path("../lib/nio/version", __FILE__)
require File.expand_path("lib/nio/version", __dir__)

Gem::Specification.new do |spec|
spec.authors = ["Tony Arcieri"]
@@ -20,7 +20,15 @@ Gem::Specification.new do |spec|
spec.require_paths = ["lib"]
spec.version = NIO::VERSION

spec.required_ruby_version = ">= 2.3"
spec.metadata = {
"bug_tracker_uri" => "https://github.com/socketry/nio4r/issues",
"changelog_uri" => "https://github.com/socketry/nio4r/blob/master/CHANGES.md",
"documentation_uri" => "https://www.rubydoc.info/gems/nio4r/#{spec.version}",
"source_code_uri" => "https://github.com/socketry/nio4r/tree/v#{spec.version}",
"wiki_uri" => "https://github.com/socketry/nio4r/wiki"
}

spec.required_ruby_version = ">= 2.4"

if defined? JRUBY_VERSION
spec.files << "lib/nio4r_ext.jar"
1 change: 0 additions & 1 deletion spec/nio/bytebuffer_spec.rb
Original file line number Diff line number Diff line change
@@ -352,4 +352,3 @@
end
end
end
# rubocop:enable Metrics/BlockLength
4 changes: 3 additions & 1 deletion spec/nio/selectables/ssl_socket_spec.rb
Original file line number Diff line number Diff line change
@@ -1,9 +1,11 @@
# frozen_string_literal: true

require "spec_helper"
require "openssl"

RSpec.describe OpenSSL::SSL::SSLSocket do

require "openssl"

before(:all) do
@tls = []
end
4 changes: 2 additions & 2 deletions spec/nio/selectables/udp_socket_spec.rb
Original file line number Diff line number Diff line change
@@ -33,8 +33,8 @@
peer.send("X" * 1024, 0)
cntr += 1
t = select [], [peer], [], 0
rescue Errno::ECONNREFUSED => ex
skip "Couldn't make writable UDPSocket subject: #{ex.class}: #{ex}"
rescue Errno::ECONNREFUSED => e
skip "Couldn't make writable UDPSocket subject: #{e.class}: #{e}"
end while t && t[1].include?(peer) && cntr < 5

peer
1 change: 0 additions & 1 deletion spec/nio/selector_spec.rb
Original file line number Diff line number Diff line change
@@ -234,4 +234,3 @@
expect(subject).to be_closed
end
end
# rubocop:enable Metrics/BlockLength