B
barjunk
I'm writing some new code and using #!/usr/bin/ruby -w as the bang line
in the script.
The code looks like:
require 'rubygems'
require 'net/ldap'
<snip>
filter = Net::LDAP::Filter.eq( "key","value" )
ldap.search
base =>treebase, :filter => filter)
<snip>
I get:
/usr/lib/ruby/gems/1.8/gems/ruby-net-ldap-0.0.4/lib/net/ldap/filter.rb:310:
warning: ambiguous first argument; put parentheses or even spaces
/usr/lib/ruby/gems/1.8/gems/ruby-net-ldap-0.0.4/lib/net/ldap/filter.rb:311:
warning: ambiguous first argument; put parentheses or even spaces
/usr/lib/ruby/gems/1.8/gems/ruby-net-ldap-0.0.4/lib/net/ldap/filter.rb:324:
warning: ambiguous first argument; put parentheses or even spaces
/usr/lib/ruby/gems/1.8/gems/ruby-net-ldap-0.0.4/lib/net/ldap/filter.rb:338:
warning: ambiguous first argument; put parentheses or even spaces
/usr/lib/ruby/gems/1.8/gems/ruby-net-ldap-0.0.4/lib/net/ldap/filter.rb:356:
warning: ambiguous first argument; put parentheses or even spaces
/usr/lib/ruby/gems/1.8/gems/ruby-net-ldap-0.0.4/lib/net/ldap/filter.rb:358:
warning: ambiguous first argument; put parentheses or even spaces
/usr/lib/ruby/gems/1.8/gems/ruby-net-ldap-0.0.4/lib/net/ldap/filter.rb:360:
warning: ambiguous first argument; put parentheses or even spaces
These warnings occurs after the filter line but before the search line.
This looks like it is at the lines that have:
scanner.scan <someregex>
What needs to be done to make those warnings go away?
Mike B.
in the script.
The code looks like:
require 'rubygems'
require 'net/ldap'
<snip>
filter = Net::LDAP::Filter.eq( "key","value" )
ldap.search
<snip>
I get:
/usr/lib/ruby/gems/1.8/gems/ruby-net-ldap-0.0.4/lib/net/ldap/filter.rb:310:
warning: ambiguous first argument; put parentheses or even spaces
/usr/lib/ruby/gems/1.8/gems/ruby-net-ldap-0.0.4/lib/net/ldap/filter.rb:311:
warning: ambiguous first argument; put parentheses or even spaces
/usr/lib/ruby/gems/1.8/gems/ruby-net-ldap-0.0.4/lib/net/ldap/filter.rb:324:
warning: ambiguous first argument; put parentheses or even spaces
/usr/lib/ruby/gems/1.8/gems/ruby-net-ldap-0.0.4/lib/net/ldap/filter.rb:338:
warning: ambiguous first argument; put parentheses or even spaces
/usr/lib/ruby/gems/1.8/gems/ruby-net-ldap-0.0.4/lib/net/ldap/filter.rb:356:
warning: ambiguous first argument; put parentheses or even spaces
/usr/lib/ruby/gems/1.8/gems/ruby-net-ldap-0.0.4/lib/net/ldap/filter.rb:358:
warning: ambiguous first argument; put parentheses or even spaces
/usr/lib/ruby/gems/1.8/gems/ruby-net-ldap-0.0.4/lib/net/ldap/filter.rb:360:
warning: ambiguous first argument; put parentheses or even spaces
These warnings occurs after the filter line but before the search line.
This looks like it is at the lines that have:
scanner.scan <someregex>
What needs to be done to make those warnings go away?
Mike B.