Project

General

Profile

Actions

Feature #3922

closed

Syntax awkwardness

Added by Ragmaanir (Ragmaanir Anon) over 13 years ago. Updated about 12 years ago.

Status:
Rejected
Target version:
-
[ruby-core:32731]

Description

=begin
[code]
1 + (2; 1) #=> 2
puts(1; 2) #=> syntax error
puts((1; 2)) # like: puts 2
puts (3)*2 #=> 6
puts(3)*2 #=> nil-error
puts (1; 2) #=> syntax error
puts (1; 2)*3 #=> syntax error
puts ((1; 2))*3 # like: puts 6
[/code]

IMO this is awkward behavior (but maybe it is intended). I think the same results can be achieved with a newline instead of ';'.
=end

Actions

Also available in: Atom PDF

Like0
Like0Like0Like0Like0Like0