Details

    • Type: Bug Bug
    • Status: Resolved Resolved
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: JRuby 1.7.0.pre1
    • Component/s: None
    • Labels:
      None
    • Environment:
      jruby 1.7.0.dev (ruby-1.8.7-p330) (2011-11-16 b7c3cc2) (Java HotSpot(TM) Client VM 1.6.0_24) [Windows 7-x86-java]
    • Testcase included:
      yes
    • Number of attachments :
      0

      Description

      >> $-v = nil
      >> A = 3
      >> A = 3

      should not give warnings (MRI doesn't). But does

      ref: https://github.com/jimmyz/ruby-fs-stack/blob/master/lib/ruby-fs-stack/warning_suppressor.rb

        Activity

        Hide
        Hiro Asari added a comment -

        Am I missing something?

        $ irb
        ruby-1.9.3-p0 :001 > $-v=1
         => 1 
        ruby-1.9.3-p0 :002 > A=3
         => 3 
        ruby-1.9.3-p0 :003 > A=3
        (irb):3: warning: already initialized constant A
         => 3 
        ruby-1.9.3-p0 :004 > RUBY_DESCRIPTION
         => "ruby 1.9.3p0 (2011-10-30 revision 33570) [x86_64-darwin11.2.0]"
        

        At any rate, it appears that we are missing a few predefined globals: $-v, $-w, $-W.

        Show
        Hiro Asari added a comment - Am I missing something? $ irb ruby-1.9.3-p0 :001 > $-v=1 => 1 ruby-1.9.3-p0 :002 > A=3 => 3 ruby-1.9.3-p0 :003 > A=3 (irb):3: warning: already initialized constant A => 3 ruby-1.9.3-p0 :004 > RUBY_DESCRIPTION => "ruby 1.9.3p0 (2011-10-30 revision 33570) [x86_64-darwin11.2.0]" At any rate, it appears that we are missing a few predefined globals: $-v , $-w , $-W .
        Hide
        Roger Pack added a comment -

        $-v = nil

        Show
        Roger Pack added a comment - $-v = nil
        Hide
        Hiro Asari added a comment -

        Ah, right. Of course. $-v and $-w are easy to add. $-W seems a bit more involved.

        Show
        Hiro Asari added a comment - Ah, right. Of course. $-v and $-w are easy to add. $-W seems a bit more involved.
        Hide
        Hiro Asari added a comment -

        Pushed the fix for $-v and $-w to the master: 039bba2. We still need $-W, but that's for another ticket.

        Show
        Hiro Asari added a comment - Pushed the fix for $-v and $-w to the master: 039bba2. We still need $-W , but that's for another ticket.

          People

          • Assignee:
            Hiro Asari
            Reporter:
            Roger Pack
          • Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved: