From: inform@... Date: 2017-08-14T19:05:39+00:00 Subject: [ruby-core:82381] [Ruby trunk Bug#13815] p changes scope of *vars Issue #13815 has been updated by opti (Andreas Opti). Subject changed from p changes scope of vars to p changes scope of *vars x=y=0 # outside defined vars! 3.times { x,y = x+1,y+1 } # as expected: x==3 3.times { 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 ---------------------------------------- Bug #13815: p changes scope of *vars https://bugs.ruby-lang.org/issues/13815#change-66177 * Author: opti (Andreas Opti) * Status: Open * Priority: Normal * Assignee: * Target version: * ruby -v: 2.4 and 2.5 * 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: