Hi, Fiddle currently produces a frozen string literal warning with JRuby 10 when passing a string argument to an FFI function.
/Users/user/.rbenv/versions/jruby-10.0.0.0/lib/ruby/gems/shared/gems/fiddle-1.1.6/lib/fiddle/ffi_backend.rb:174: warning: literal string will be frozen in the future, the string was created here: repro.rb:10
Repro script
require "fiddle/import"
module Hello
extend Fiddle::Importer
dlload "/usr/lib/libSystem.B.dylib" # for Mac, replace on Linux/Windows
extern "int puts(const char* str)"
end
Hello.puts("world") # warning
Hello.puts(+"world") # no warning
And run with:
RUBYOPT="--debug-frozen-string-literal" ruby repro.rb
Hi, Fiddle currently produces a frozen string literal warning with JRuby 10 when passing a string argument to an FFI function.
Repro script
And run with:
RUBYOPT="--debug-frozen-string-literal" ruby repro.rb