Skip to content

Instantly share code, notes, and snippets.

@emonti
Created January 12, 2010 21:44
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 emonti/275646 to your computer and use it in GitHub Desktop.
Save emonti/275646 to your computer and use it in GitHub Desktop.
#!/usr/bin/env jruby
# This code works fine in MRI, but not JRuby. For some strange reason
# jruby cannot superclass FFI::MemoryPointer or FFI::Buffer and override
# the initialize() method.
require 'ffi'
class SpecialBuffer < FFI::Buffer
def initialize()
super(256)
end
end
p SpecialBuffer.new()
# produces:
# ArgumentError: wrong # of arguments(0 for 1)
# from ...:in `new'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment