rubyjs / therubyracer

Embed the V8 Javascript Interpreter into Ruby
1.66k stars 193 forks source link

Lots of warnings with recent defaults #440

Closed lloeki closed 10 months ago

lloeki commented 7 years ago

When running tests on a project depending on therubyracer some warnings are raised (see below).

This is because with a recent rake (>=11.0), ruby warnings are now on by default.

What do you think about fixing those warnings as well as running the test suite with ruby -w / $VERBOSE = true?

Also, some people took a stab at fixing this but the PRs are old (#253 #323). The output below is with the latest version.

/Users/lloeki/.gem/ruby/2.3.4/gems/therubyracer-0.12.3/lib/v8/access/invocation.rb:16: warning: `*' interpreted as argument prefix
/Users/lloeki/.gem/ruby/2.3.4/gems/therubyracer-0.12.3/lib/v8/access/invocation.rb:27: warning: `*' interpreted as argument prefix
/Users/lloeki/.gem/ruby/2.3.4/gems/therubyracer-0.12.3/lib/v8/access/invocation.rb:31: warning: `*' interpreted as argument prefix
/Users/lloeki/.gem/ruby/2.3.4/gems/therubyracer-0.12.3/lib/v8/error.rb:43: warning: assigned but unused variable - trace_framework
/Users/lloeki/.gem/ruby/2.3.4/gems/therubyracer-0.12.3/lib/v8/error.rb:64: warning: assigned but unused variable - backtrace
/Users/lloeki/.gem/ruby/2.3.4/gems/therubyracer-0.12.3/lib/v8/error.rb:69: warning: `*' interpreted as argument prefix
/Users/lloeki/.gem/ruby/2.3.4/gems/therubyracer-0.12.3/lib/v8/error.rb:74: warning: `*' interpreted as argument prefix
/Users/lloeki/.gem/ruby/2.3.4/gems/therubyracer-0.12.3/lib/v8/init.bundle: warning: method redefined; discarding old IntegerValue
/Users/lloeki/.gem/ruby/2.3.4/gems/therubyracer-0.12.3/lib/v8/weak.rb:58: warning: instance variable @constructor not initialized
/Users/lloeki/.gem/ruby/2.3.4/gems/therubyracer-0.12.3/lib/v8/weak.rb:58: warning: instance variable @template not initialized
/Users/lloeki/.gem/ruby/2.3.4/gems/therubyracer-0.12.3/lib/v8/weak.rb:65: warning: instance variable @ref not initialized