[MacRuby] #1004: warnings when running macirb
#1004: warnings when running macirb --------------------------------+------------------------------------------- Reporter: mhmstuff@… | Owner: lsansonetti@… Type: defect | Status: new Priority: critical | Milestone: Component: MacRuby | Keywords: --------------------------------+------------------------------------------- When I start up macirb, or execute any commands in it, I get warnings. Here's an example: irb(main):005:0> ''.methods.size ''.methods.size unknown: warning: instance variable @in_regexp not initialized unknown: warning: instance variable @in_array not initialized unknown: warning: instance variable @terminate not initialized unknown: warning: instance variable @syntax_error not initialized => 169 unknown: warning: instance variable @in_string not initialized unknown: warning: instance variable @in_regexp not initialized unknown: warning: instance variable @in_array not initialized irb(main):006:0> As far as I have tested, it works anyway, but it continues to get those warnings each time I execute a command. -- Ticket URL: <http://www.macruby.org/trac/ticket/1004> MacRuby <http://macruby.org/>
#1004: warnings when running macirb --------------------------------+------------------------------------------- Reporter: mhmstuff@… | Owner: lsansonetti@… Type: defect | Status: new Priority: critical | Milestone: Component: MacRuby | Keywords: --------------------------------+------------------------------------------- Description changed by lsansonetti@…: Old description:
When I start up macirb, or execute any commands in it, I get warnings. Here's an example:
irb(main):005:0> ''.methods.size ''.methods.size unknown: warning: instance variable @in_regexp not initialized unknown: warning: instance variable @in_array not initialized unknown: warning: instance variable @terminate not initialized unknown: warning: instance variable @syntax_error not initialized => 169 unknown: warning: instance variable @in_string not initialized unknown: warning: instance variable @in_regexp not initialized unknown: warning: instance variable @in_array not initialized irb(main):006:0>
As far as I have tested, it works anyway, but it continues to get those warnings each time I execute a command.
New description: When I start up macirb, or execute any commands in it, I get warnings. Here's an example: {{{ irb(main):005:0> ''.methods.size ''.methods.size unknown: warning: instance variable @in_regexp not initialized unknown: warning: instance variable @in_array not initialized unknown: warning: instance variable @terminate not initialized unknown: warning: instance variable @syntax_error not initialized => 169 unknown: warning: instance variable @in_string not initialized unknown: warning: instance variable @in_regexp not initialized unknown: warning: instance variable @in_array not initialized irb(main):006:0> }}} As far as I have tested, it works anyway, but it continues to get those warnings each time I execute a command. -- -- Ticket URL: <http://www.macruby.org/trac/ticket/1004#comment:1> MacRuby <http://macruby.org/>
#1004: warnings when running macirb --------------------------------+------------------------------------------- Reporter: mhmstuff@… | Owner: lsansonetti@… Type: defect | Status: new Priority: critical | Milestone: Component: MacRuby | Keywords: --------------------------------+------------------------------------------- Comment(by lsansonetti@…): I can reproduce this by enabling warnings when running macirb. {{{ $ RUBYOPT=-w /usr/local/bin/macirb irb(main):001:0> ''.methods unknown: warning: instance variable @in_string not initialized unknown: warning: instance variable @in_regexp not initialized unknown: warning: instance variable @in_array not initialized unknown: warning: instance variable @in_regexp not initialized unknown: warning: instance variable @in_array not initialized unknown: warning: instance variable @terminate not initialized unknown: warning: instance variable @syntax_error not initialized => [:encode!, :encode, :__stored_in_uchars__?, :__getchar__, :__chars_count__, :transform, :crypt, :rpartition, :partition, :sum, :tr_s!, :tr_s, :tr!, :tr, :squeeze!, :squeeze, :delete!, :delete, :count, :reverse!, :reverse, :upto, :next!, :next, :succ!, :succ, :each_codepoint, :codepoints, :each_byte, :bytes, :each_char, :chars, :each_line, :lines, :rstrip!, :lstrip!, :strip!, :rstrip, :lstrip, :strip, :center, :rjust, :ljust, :capitalize!, :capitalize, :swapcase!, :swapcase, :upcase!, :upcase, :downcase!, :downcase, :gsub!, :gsub, :sub!, :sub, :chop!, :chop, :chomp!, :chomp, :to_f, :chr, :ord, :oct, :hex, :to_i, :split, :scan, :=~, :match, :dump, :inspect, :intern, :to_sym, :to_str, :to_s, :end_with?, :start_with?, :include?, :eql?, :casecmp, :<=>, :==, :concat, :<<, :%, :*, :+, :rindex, :index, :insert, :slice!, :slice, :[]=, :[], :ascii_only?, :valid_encoding?, :force_encoding, :pointer, :to_data, :setbyte, :getbyte, :bytesize, :empty?, :size, :encoding, :clear, :replace, :clone, :dup, :to_c, :to_r, :unpack, :>, :>=, :<, :<=, :between?, :clear_history!, :h!, :history!, :h, :history, :to_plist, :Complex, :Rational, :callcc, :enum_for, :to_enum, :object_id, :__id__, :define_singleton_method, :public_method, :method, :extend, :respond_to_missing?, :respond_to?, :public_send, :send, :__send__, :instance_exec, :instance_eval, :__callee__, :__method__, :tap, :is_a?, :kind_of?, :instance_of?, :instance_variable_defined?, :instance_variable_set, :instance_variable_get, :instance_variables, :public_methods, :private_methods, :protected_methods, :singleton_methods, :methods, :untrusted?, :untrust, :trust, :frozen?, :freeze, :untaint, :tainted?, :taint, :__type__, :!~, :===, :nil?, :!=, :!, :equal?] unknown: warning: instance variable @in_string not initialized unknown: warning: instance variable @in_regexp not initialized unknown: warning: instance variable @in_array not initialized }}} -- Ticket URL: <http://www.macruby.org/trac/ticket/1004#comment:2> MacRuby <http://macruby.org/>
#1004: warnings when running macirb --------------------------------+------------------------------------------- Reporter: mhmstuff@… | Owner: eloy.de.enige@… Type: defect | Status: new Priority: critical | Milestone: Component: MacRuby | Keywords: --------------------------------+------------------------------------------- Changes (by lsansonetti@…): * owner: lsansonetti@… => eloy.de.enige@… Comment: Problem is in lib/irb/source.rb, line 75. {{{ @code_block = !parse.nil? && !@in_string && !@in_regexp && !@in_array }}} These ivars have not been created yet, and if used in a conditional as is with warnings enabled, a warning will be raised. I verified with a similar snippet with MRI. {{{ $ ruby -e 'foo=!@foo&&!@bar' $ ruby -w -e 'foo=!@foo&&!@bar' -e:1: warning: instance variable @foo not initialized -e:1: warning: instance variable @bar not initialized }}} -- Ticket URL: <http://www.macruby.org/trac/ticket/1004#comment:3> MacRuby <http://macruby.org/>
#1004: warnings when running macirb --------------------------------+------------------------------------------- Reporter: mhmstuff@… | Owner: eloy.de.enige@… Type: defect | Status: new Priority: critical | Milestone: Component: MacRuby | Keywords: --------------------------------+------------------------------------------- Comment(by eloy.de.enige@…): I really dislike pre-defining instance variables unless really necessary, but obviously this gets annoying if you run it with warnings enabled. I'll fix this tonight. -- Ticket URL: <http://www.macruby.org/trac/ticket/1004#comment:4> MacRuby <http://macruby.org/>
#1004: warnings when running macirb --------------------------------+------------------------------------------- Reporter: mhmstuff@… | Owner: eloy.de.enige@… Type: defect | Status: closed Priority: critical | Milestone: MacRuby 0.8 Component: MacRuby | Resolution: fixed Keywords: | --------------------------------+------------------------------------------- Changes (by eloy.de.enige@…): * status: new => closed * resolution: => fixed * milestone: => MacRuby 0.8 Comment: Got rid of all warnings I found, in r4945. -- Ticket URL: <http://www.macruby.org/trac/ticket/1004#comment:5> MacRuby <http://macruby.org/>
participants (1)
-
MacRuby