Actions
Bug #628
closedAssigning to $0 truncates value
Description
=begin
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).
=end
Updated by nobu (Nobuyoshi Nakada) almost 16 years ago
- Status changed from Open to Rejected
=begin
Not a bug.
$0 rewrites system provided area so that ps command can show it,
and its length is restricted by OS (and command line length on some platforms).
=end
Actions
Like0
Like0