wasmerio / wasmer-ruby

💎🕸 WebAssembly runtime for Ruby
https://wasmer.io
MIT License
471 stars 18 forks source link

`undefining the allocator of T_DATA class ...` warning on Ruby 3.2 #74

Open eric-hemasystems opened 1 year ago

eric-hemasystems commented 1 year ago

Describe the bug

In Ruby 3.2 all the wasmer classes when creating an instance now show a warning similar to:

warning: undefining the allocator of T_DATA class Wasmer::Store

It's not just Wasmer::Store that does this but I also see it on Wasmer::Module, Wasmer::Wasi::StateBuilder, Wasmer::Wasi::Environment and Wasmer::ImportObject.

Steps to reproduce

% irb
irb(main):001:0> require "wasmer"
=> true
irb(main):002:0> Wasmer::Store.new
(irb):2: warning: undefining the allocator of T_DATA class Wasmer::Store

Expected behavior

The instance should be created without a warning.

Actual behavior

I get a warning. It can be suppressed via $VERBOSE (or Rails' silence_warnings which is a wrapper for $VERBSOSE). The actual functionality seems to all work just fine.

Additional context

I was previously using Ruby 3.0.4 and did not get a warning with that version.