Skip to content

Instantly share code, notes, and snippets.

@blinsay
Created October 17, 2014 21:37
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save blinsay/6af4e96a5ec5536e5480 to your computer and use it in GitHub Desktop.
Save blinsay/6af4e96a5ec5536e5480 to your computer and use it in GitHub Desktop.
irb(main):001:0> is = File.new("foo.txt").to_inputstream
=> #<Java::OrgJrubyUtilIo::ChannelStream::InputStreamAdapter:0x3632be31>
irb(main):002:0> is.close
=> nil
irb(main):003:0> is.close
Java::JavaIo::IOException:
from java.lang.reflect.Method.invoke(java/lang/reflect/Method.java:483)
from RUBY.evaluate((irb):3)
from org.jruby.RubyKernel.eval(org/jruby/RubyKernel.java:1107)
from org.jruby.RubyKernel.loop(org/jruby/RubyKernel.java:1507)
from org.jruby.RubyKernel.catch(org/jruby/RubyKernel.java:1270)
from org.jruby.RubyKernel.catch(org/jruby/RubyKernel.java:1270)
from $_dot_.bin.irb.(root)(./bin/irb:13)
from $_dot_.bin.irb.(root)($_dot_/bin/./bin/irb:13)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment