BasicSocket.shutdown() is not compliant for >= 1.9.x #1579

coffeeaddict opened this Issue Mar 25, 2014 · 1 comment

3 participants



with the following script:

require 'socket'
require 'json'

puts "v#{RUBY_VERSION}"

start =
s = 'localhost', 1234
s.write({ address: "some-bus-address", payload: { foo: "bar-#{i}" } }.to_json)
puts "#{i} Done in %.5fs" % ( - start).to_f

I get the following error:

TypeError: can't convert Symbol into Integer
  shutdown at org/jruby/ext/socket/
    (root) at client.rb:14

According to the argument for shutdown can be a number, symbol or a string. This changed since 1.8.x

@atambo atambo added a commit to atambo/jruby that referenced this issue Apr 25, 2014
@atambo atambo BasicSocket#shutdown should accept strings or symbols
Fixes #1579
@atambo atambo added this to the JRuby 1.7.13 milestone Apr 25, 2014
JRuby Team member

Fixed by #1663

@lucasallan lucasallan closed this Apr 26, 2014
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment