On Tuesday, June 28, 2016 at 4:00:11 PM UTC-7, Josh Wilcox wrote:
>
> I know its been said that a fix for the warnings about instance variables 
> not being initialized will not be merge, but this is a bit ridiculous
>
>   succeeds if neither account is referenced by an existing link
> /Users/.../.rvm/gems/ruby-2.3.0/gems/sequel-4.35.0/lib/sequel/dataset/sql.rb:1493:
>  
> warning: instance variable @skip_symbol_cache not initialized
> /Users/.../.rvm/gems/ruby-2.3.0/gems/sequel-4.35.0/lib/sequel/dataset/sql.rb:1493:
>  
> warning: instance variable @skip_symbol_cache not initialized
> /Users/.../.rvm/gems/ruby-2.3.0/gems/sequel-4.35.0/lib/sequel/dataset/sql.rb:1493:
>  
> warning: instance variable @skip_symbol_cache not initialized
> /Users/.../.rvm/gems/ruby-2.3.0/gems/sequel-4.35.0/lib/sequel/dataset/sql.rb:1493:
>  
> warning: instance variable @skip_symbol_cache not initialized
> /Users/.../.rvm/gems/ruby-2.3.0/gems/sequel-4.35.0/lib/sequel/dataset/sql.rb:1493:
>  
> warning: instance variable @skip_symbol_cache not initialized
> /Users/.../.rvm/gems/ruby-2.3.0/gems/sequel-4.35.0/lib/sequel/dataset/sql.rb:1493:
>  
> warning: instance variable @skip_symbol_cache not initialized
> /Users/.../.rvm/gems/ruby-2.3.0/gems/sequel-4.35.0/lib/sequel/dataset/sql.rb:1493:
>  
> warning: instance variable @skip_symbol_cache not initialized
> /Users/.../.rvm/gems/ruby-2.3.0/gems/sequel-4.35.0/lib/sequel/dataset/sql.rb:1493:
>  
> warning: instance variable @skip_symbol_cache not initialized
> /Users/.../.rvm/gems/ruby-2.3.0/gems/sequel-4.35.0/lib/sequel/dataset/misc.rb:85:
>  
> warning: instance variable @frozen not initialized
> /Users/.../.rvm/gems/ruby-2.3.0/gems/sequel-4.35.0/lib/sequel/dataset/misc.rb:85:
>  
> warning: instance variable @frozen not initialized
> /Users/.../.rvm/gems/ruby-2.3.0/gems/sequel-4.35.0/lib/sequel/dataset/sql.rb:1493:
>  
> warning: instance variable @skip_symbol_cache not initialized
> /Users/.../.rvm/gems/ruby-2.3.0/gems/sequel-4.35.0/lib/sequel/dataset/sql.rb:1493:
>  
> warning: instance variable @skip_symbol_cache not initialized
> /Users/.../.rvm/gems/ruby-2.3.0/gems/sequel-4.35.0/lib/sequel/dataset/sql.rb:1493:
>  
> warning: instance variable @skip_symbol_cache not initialized
>
> that is after ever test that uses sequel.  I tried setting RUBYOPT="-W0" 
> but to no avail.
>

With ruby, the latest -w or -W setting wins, though RUBYOPT is processed 
after command line variables:

$ ruby -w -e '@a.class'
-e:1: warning: instance variable @a not initialized
$ RUBYOPT="-W0" ruby -w -e '@a.class'
$ RUBYOPT="-W0 -w" ruby -e '@a.class'
-e:1: warning: instance variable @a not initialized
$ RUBYOPT="-w -W0" ruby -e '@a.class'

That's beside the point.  Sequel chooses optimization over -w warnings, 
reasoning that more users would desire the extra speed compared to users 
that care about -w warnings.  If this causes you to not want to use Sequel, 
that's unfortunate but a price I'm willing to accept.

Note that matz has already approved my warning filtering idea, so unless 
there are issues it should be in ruby 2.4 (though it's not in preview1), 
which means that starting next year, Sequel users using ruby 2.4 will no 
longer see these warnings.

In the mean time, the simplest solution is just to not use -w, or to filter 
the instance variable warnings manually (as some of Sequel's tests do, see 
the Rakefile).

Thanks,
Jeremy

-- 
You received this message because you are subscribed to the Google Groups 
"sequel-talk" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at https://groups.google.com/group/sequel-talk.
For more options, visit https://groups.google.com/d/optout.

Reply via email to