3 ms·
Especially when Ruby has no way of scoping these variables... unlike Perl: { # level 1 local $\ = "[1]\n"; some_print_operation();
by draegtun 14y ago
Especially when Ruby has no way of scoping these variables... unlike Perl:
{
# level 1
local $\ = "[1]\n";
some_print_operation();
{
# level 2
local $\ = "[2]\n";
some_print_operation();
}
# level 1 again
some_print_operation();
}
# $\ back to what it was before all this :)