floraison / et-orbi

Time zones for fugit and rufus-scheduler. Urbi et Orbi.
MIT License
24 stars 11 forks source link

warnings from rspec #10

Closed mdave16 closed 6 years ago

mdave16 commented 6 years ago

I am using rufus, and when i run rspec with tests, I get the following warnings:

/Users/me/.rvm/gems/ruby-2.4.2/gems/et-orbi-1.0.5/lib/et-orbi.rb:608: warning: assigned but unused variable - tu
/Users/me/.rvm/gems/ruby-2.4.2/gems/et-orbi-1.0.5/lib/et-orbi.rb:151: warning: instance variable @local_tzone_loaded_at not initialized
/Users/me/.rvm/gems/ruby-2.4.2/gems/et-orbi-1.0.5/lib/et-orbi.rb:153: warning: instance variable @local_tzone_tz not initialized

I imagine they are easy fixes, and just leftover from some change or another.

mdave16 commented 6 years ago

noticed I was out of date, so updated to 1.0.8;

/Users/me/.rvm/gems/ruby-2.4.2/gems/et-orbi-1.0.8/lib/et-orbi.rb:682: warning: assigned but unused variable - tu
/Users/me/.rvm/gems/ruby-2.4.2/gems/et-orbi-1.0.8/lib/et-orbi.rb:163: warning: instance variable @local_tzone_loaded_at not initialized
/Users/me/.rvm/gems/ruby-2.4.2/gems/et-orbi-1.0.8/lib/et-orbi.rb:165: warning: instance variable @local_tzone_tz not initialized

same issues, but different lines. I know sometimes warnings can be ignored, but it's best practice not to.

Having looked at the files a bit more now, I can see why the non initialized vars are present, but also found that tu is on line 700 and nowhere else. Is it needed?

jmettraux commented 6 years ago

Many thanks!

jmettraux commented 6 years ago

1.0.9 has been pushed to RubyGems and it includes the fix.

Thanks again.