Skip to content

Commit

Permalink
Merge ab49b3e into 01099e7
Browse files Browse the repository at this point in the history
  • Loading branch information
ioquatix committed Jul 7, 2019
2 parents 01099e7 + ab49b3e commit d9ab06b
Show file tree
Hide file tree
Showing 6 changed files with 17 additions and 18 deletions.
2 changes: 1 addition & 1 deletion .rubocop.yml
@@ -1,5 +1,5 @@
AllCops:
TargetRubyVersion: 2.2
TargetRubyVersion: 2.3
DisplayCopNames: true

Layout/SpaceInsideBlockBraces:
Expand Down
10 changes: 2 additions & 8 deletions appveyor.yml
Expand Up @@ -11,7 +11,6 @@ environment:
- RUBY_VERSION: 24-x64
- RUBY_VERSION: 23-x64
- RUBY_VERSION: 23
- RUBY_VERSION: 22

init:
- ps: |
Expand All @@ -23,16 +22,11 @@ init:
install:
- SET RAKEOPT=-rdevkit
- ps: |
if ($env:RUBY_VERSION -eq '_trunk' -or $env:RUBY_VERSION -ge '23' ) {
gem update --system --conservative --no-document
} else {
gem update --system 2.7.9 --conservative --no-document
}
- gem update --system --conservative --no-document
- ruby -v
- gem -v
- bundle -v
- bundle install --path vendor\bundle
- bundle install --path vendor\bundle --without development

test_script:
- bundle exec rake spec
Expand Down
13 changes: 9 additions & 4 deletions ext/libev/ev.c
Expand Up @@ -40,6 +40,10 @@
/* ########## NIO4R PATCHERY HO! ########## */
#include "ruby.h"
#include "ruby/thread.h"

#ifdef __APPLE__
#include <AvailabilityMacros.h>
#endif
/* ######################################## */

/* this big block deduces configuration from config.h */
Expand Down Expand Up @@ -2765,16 +2769,17 @@ ev_recommended_backends (void) EV_NOEXCEPT
{
unsigned int flags = ev_supported_backends ();

#ifndef __NetBSD__
#if defined(__APPLE__) && (MAC_OS_X_VERSION_MIN_REQUIRED >= MAC_OS_X_VERSION_10_14)
/* apple has a poor track record but post 10.12.2 it seems to work sufficiently well */
#elif defined(__NetBSD__)
/* kqueue is borked on everything but netbsd apparently */
/* it usually doesn't work correctly on anything but sockets and pipes */
flags &= ~EVBACKEND_KQUEUE;
#endif
#ifdef __APPLE__
#else
/* only select works correctly on that "unix-certified" platform */
flags &= ~EVBACKEND_KQUEUE; /* horribly broken, even for sockets */
flags &= ~EVBACKEND_POLL; /* poll is based on kqueue from 10.5 onwards */
#endif

#ifdef __FreeBSD__
flags &= ~EVBACKEND_POLL; /* poll return value is unusable (http://forums.freebsd.org/archive/index.php/t-10270.html) */
#endif
Expand Down
6 changes: 3 additions & 3 deletions lib/nio.rb
Expand Up @@ -18,16 +18,16 @@ def self.engine
require "nio/monitor"
require "nio/selector"
require "nio/bytebuffer"
NIO::ENGINE = "ruby".freeze
NIO::ENGINE = "ruby"
else
require "nio4r_ext"

if defined?(JRUBY_VERSION)
require "java"
require "jruby"
org.nio4r.Nio4r.new.load(JRuby.runtime, false)
NIO::ENGINE = "java".freeze
NIO::ENGINE = "java"
else
NIO::ENGINE = "libev".freeze
NIO::ENGINE = "libev"
end
end
2 changes: 1 addition & 1 deletion lib/nio/version.rb
@@ -1,5 +1,5 @@
# frozen_string_literal: true

module NIO
VERSION = "2.4.0".freeze
VERSION = "2.4.0"
end
2 changes: 1 addition & 1 deletion nio4r.gemspec
Expand Up @@ -20,7 +20,7 @@ Gem::Specification.new do |spec|
spec.require_paths = ["lib"]
spec.version = NIO::VERSION

spec.required_ruby_version = ">= 2.2.2"
spec.required_ruby_version = ">= 2.3"

if defined? JRUBY_VERSION
spec.files << "lib/nio4r_ext.jar"
Expand Down

0 comments on commit d9ab06b

Please sign in to comment.