Issue #13815 has been updated by matz (Yukihiro Matsumoto).

Status changed from Open to Closed

Andreas, it's easy to say "might be improved", but without the concrete design, it's worth nothing for us.
We designed for reasons, with the balance of features. Please submit the proposal, if you come up with the new idea.

Matz.

----------------------------------------
Bug #13815: p args
https://bugs.ruby-lang.org/issues/13815#change-66211

* Author: opti (Andreas Opti)
* Status: Closed
* Priority: Normal
* Assignee: 
* Target version: 
* ruby -v: 2.5.x
* Backport: 2.2: UNKNOWN, 2.3: UNKNOWN, 2.4: UNKNOWN
----------------------------------------
x=y=0  # outside defined vars!
3.times {|i| x,y=x+1,y+1 }  # as expected: x==3
3.times {|i| p(x,y=x+1,y+1) }  # NOT as expected: x not changed!
  # x,y are the same vars as above. p shoudn't have any effect on scope






-- 
https://bugs.ruby-lang.org/

Unsubscribe: <mailto:ruby-core-request / ruby-lang.org?subject=unsubscribe>
<http://lists.ruby-lang.org/cgi-bin/mailman/options/ruby-core>