[MacRuby] #1026: IO::open give a warning when passed a block
#1026: IO::open give a warning when passed a block ------------------------------------+--------------------------------------- Reporter: mrada@… | Owner: lsansonetti@… Type: defect | Status: new Priority: major | Milestone: Component: MacRuby | Keywords: ------------------------------------+--------------------------------------- I get: unknown: warning: IO::new() does not take block; use IO::open() instead But everything still works. -- Ticket URL: <http://www.macruby.org/trac/ticket/1026> MacRuby <http://macruby.org/>
#1026: IO::open give a warning when passed a block ------------------------------------+--------------------------------------- Reporter: mrada@… | Owner: lsansonetti@… Type: defect | Status: new Priority: major | Milestone: Component: MacRuby | Keywords: ------------------------------------+--------------------------------------- Comment(by watson1978@…): {{{ $ ruby19 -v -e "IO.open(1){|f| p f}" ruby 1.9.2p0 (2010-08-18 revision 29036) [x86_64-darwin10.4.0] #<IO:fd 1> $ ruby -v -e "IO.open(1){|f| p f}" ruby 1.8.7 (2009-06-12 patchlevel 174) [universal-darwin10.0] #<IO:0x10016aa20> macruby -e "IO.open(1){|f| p f}" unknown: warning: IO::new() does not take block; use IO::open() instead #<IO:0x20003d000> }}} The similar warning can watch TCPServer/TCPSocket/UDPSocket. {{{ macruby -r socket -e "TCPServer.open('localhost'){|f| p f}" unknown: warning: TCPServer::new() does not take block; use TCPServer::open() instead macruby -r socket -e "TCPSocket.open('localhost', 80){|f| p f}" unknown: warning: TCPSocket::new() does not take block; use TCPSocket::open() instead -e:1:in `<main>': Connection refused - connect(2) (Errno::ECONNREFUSED) macruby -r socket -e "UDPSocket.open(){|f| p f}" unknown: warning: UDPSocket::new() does not take block; use UDPSocket::open() instead #<UDPSocket:0x2000c59c0> }}} -- Ticket URL: <http://www.macruby.org/trac/ticket/1026#comment:1> MacRuby <http://macruby.org/>
#1026: IO::open give a warning when passed a block ------------------------------------+--------------------------------------- Reporter: mrada@… | Owner: lsansonetti@… Type: defect | Status: closed Priority: major | Milestone: MacRuby 0.8 Component: MacRuby | Resolution: fixed Keywords: | ------------------------------------+--------------------------------------- Changes (by lsansonetti@…): * status: new => closed * resolution: => fixed * milestone: => MacRuby 0.8 Comment: Should be fixed in r5007. -- Ticket URL: <http://www.macruby.org/trac/ticket/1026#comment:2> MacRuby <http://macruby.org/>
#1026: IO::open give a warning when passed a block ------------------------------------+--------------------------------------- Reporter: mrada@… | Owner: lsansonetti@… Type: defect | Status: reopened Priority: major | Milestone: MacRuby 0.8 Component: MacRuby | Resolution: Keywords: | ------------------------------------+--------------------------------------- Changes (by mrada@…): * status: closed => reopened * resolution: fixed => Comment: I don't think this was fixed. ± macirb irb(main):001:0> IO.new { } unknown: warning: IO::new() does not take block; use IO::open() instead ArgumentError: wrong number of arguments (0 for 1) irb(main):002:0> MACRUBY_REVISION => "svn revision 5016 from http://svn.macosforge.org/repository/ruby/MacRuby/trunk" irb(main):003:0> -- Ticket URL: <http://www.macruby.org/trac/ticket/1026#comment:3> MacRuby <http://macruby.org/>
#1026: IO::open give a warning when passed a block ------------------------------------+--------------------------------------- Reporter: mrada@… | Owner: lsansonetti@… Type: defect | Status: closed Priority: major | Milestone: MacRuby 0.8 Component: MacRuby | Resolution: fixed Keywords: | ------------------------------------+--------------------------------------- Changes (by lsansonetti@…): * status: reopened => closed * resolution: => fixed Comment: Looks like it behaves correctly? {{{ $ ruby -ve "p IO.new {}" ruby 1.8.7 (2010-01-10 patchlevel 249) [universal-darwin11.0] -e:1: warning: IO::new() does not take block; use IO::open() instead -e:1:in `initialize': wrong number of arguments (0 for 1) (ArgumentError) from -e:1:in `new' from -e:1 }}} Note that IO.open has been fixed. -- Ticket URL: <http://www.macruby.org/trac/ticket/1026#comment:4> MacRuby <http://macruby.org/>
#1026: IO::open give a warning when passed a block ------------------------------------+--------------------------------------- Reporter: mrada@… | Owner: lsansonetti@… Type: defect | Status: closed Priority: major | Milestone: MacRuby 0.8 Component: MacRuby | Resolution: fixed Keywords: | ------------------------------------+--------------------------------------- Comment(by mrada@…): Ops, sorry, I was looking at the wrong method. -- Ticket URL: <http://www.macruby.org/trac/ticket/1026#comment:5> MacRuby <http://macruby.org/>
participants (1)
-
MacRuby