V
VMDD TECH
Hello everyone,
I am new to Ruby.
If there are spaces between new and (, then ruby 1.9.1p376 considers
it a syntactical error. For example:
File.new ("write.txt", "w+")
=>
syntax error, unexpected ',', expecting ')'
File.new ("write.txt", "w+")
^
....: syntax error, unexpected ')', expecting $end
Is this a ruby bug or is it a feature/quirk of ruby?
By the way, if I write as
File.new "write.txt", "w+"
File.new("write2.txt", "w+")
then there are no problem.
Thanks,
Binh
I am new to Ruby.
If there are spaces between new and (, then ruby 1.9.1p376 considers
it a syntactical error. For example:
File.new ("write.txt", "w+")
=>
syntax error, unexpected ',', expecting ')'
File.new ("write.txt", "w+")
^
....: syntax error, unexpected ')', expecting $end
Is this a ruby bug or is it a feature/quirk of ruby?
By the way, if I write as
File.new "write.txt", "w+"
File.new("write2.txt", "w+")
then there are no problem.
Thanks,
Binh