From: Mike Furr Date: 2008-10-10T11:48:30+09:00 Subject: [ruby-core:19262] [Bug #628] Assigning to $0 truncates value Bug #628: Assigning to $0 truncates value http://redmine.ruby-lang.org/issues/show/628 Author: Mike Furr Status: Open, Priority: Normal Consider the code: $0 = "abcdefghijklmnopqrstuvwxyz" puts $0 If I save this in "test.rb" and then invoke: "ruby test.rb", I get: abcdefghijk More interestingly is that the level of truncation seems tied to the length of the command line. For instance, running "ruby -r yaml test.rb" outputs: abcdefghijklmnopq I'm running 1.8.7p72 (and this seems to be present in earlier versions, such as 1.8.5). ---------------------------------------- http://redmine.ruby-lang.org