inukshuk / citeproc-ruby

A Citation Style Language (CSL) Cite Processor
101 stars 22 forks source link

Fix warnings about uninitialized instance variables #74

Closed ghost closed 2 years ago

ghost commented 3 years ago

Fixes warning in formats/html.rb on line 243 about @css and warning in renderer/state.rb on line 83 about @names by first checking if the instance variable is defined.

mfenner commented 3 years ago

Will this be merged and released? Or what is the best way to suppress warning: instance variable @css not initialized with the current release?

inukshuk commented 2 years ago

You can change the verbosity of Ruby warnings, for example by setting RUBYOPT=W0 in your environment. This warning should also not be shown anymore in Ruby 3.0, but I'll address this and release the Gem so that the warning does not show on older Ruby versions either.

(The warning itself can be safely ignored in these cases; the instance variables are initialized to nil implicitly -- I guess that's why the warning is gone in Ruby 3.0)

inukshuk commented 2 years ago

Published 1.1.14 where these variables are initialized explicitly

mfenner commented 2 years ago

Thanks @inukshuk!