[#25936] [Bug:1.9] [rubygems] $LOAD_PATH includes bin directory — Nobuyoshi Nakada <nobu@...>

Hi,

10 messages 2009/10/05

[#25943] Disabling tainting — Tony Arcieri <tony@...>

Would it make sense to have a flag passed to the interpreter on startup that

16 messages 2009/10/05

[#26028] [Bug #2189] Math.atanh(1) & Math.atanh(-1) should not raise an error — Marc-Andre Lafortune <redmine@...>

Bug #2189: Math.atanh(1) & Math.atanh(-1) should not raise an error

14 messages 2009/10/10

[#26222] [Bug #2250] IO::for_fd() objects' finalization dangerously closes underlying fds — Mike Pomraning <redmine@...>

Bug #2250: IO::for_fd() objects' finalization dangerously closes underlying fds

11 messages 2009/10/22

[#26244] [Bug #2258] Kernel#require inside rb_require() inside rb_protect() inside SysV context fails — Suraj Kurapati <redmine@...>

Bug #2258: Kernel#require inside rb_require() inside rb_protect() inside SysV context fails

24 messages 2009/10/22

[#26361] [Feature #2294] [PATCH] ruby_bind_stack() to embed Ruby in coroutine — Suraj Kurapati <redmine@...>

Feature #2294: [PATCH] ruby_bind_stack() to embed Ruby in coroutine

42 messages 2009/10/27

[#26371] [Bug #2295] segmentation faults — tomer doron <redmine@...>

Bug #2295: segmentation faults

16 messages 2009/10/27

[ruby-core:26237] [Bug #2256] net\ftp.rb failing on implicit cast of Pathname to string

From: Sai Fujinaro <redmine@...>
Date: 2009-10-22 15:02:33 UTC
List: ruby-core #26237
Bug #2256: net\ftp.rb failing on implicit cast of Pathname to string
http://redmine.ruby-lang.org/issues/show/2256

Author: Sai Fujinaro
Status: Open, Priority: Normal
ruby -v: 1.9.1-p129-i386-mswin32

Trying to run gem install p4ruby gives an error:
can't convert Pathname into String

Running trace on rake shows that this is coming (among other places) from ftp.rb:679 and ftp.rb:547.  They are still trying to implicitly cast Pathname to string, but to_str was removed from Pathname in 1.9.1.  They can be fixed by just adding .to_s to those two lines:

ftp.rb:547:
-	retrbinary("RETR " + remotefile, blocksize, rest_offset) do |data|
+	retrbinary("RETR " + remotefile.to_s, blocksize, rest_offset) do |data|

ftp.rb: 676
    def list(*args, &block) # :yield: line
      cmd = "LIST"
      args.each do |arg|
-	cmd = cmd + " " + arg
+	cmd = cmd + " " + arg.to_s
      end
      if block

(Note that gem install p4ruby fails for other reasons than this, though)


----------------------------------------
http://redmine.ruby-lang.org

In This Thread

Prev Next