Issue #16647 has been updated by Eregon (Benoit Daloze).


Out of curiosity, why do you overwrite $/?

My personal opinion is we should deprecate all these variables affecting default separators,
they tend to break any non-trivial program, not just IRB, and explicit seems always clearer.

----------------------------------------
Bug #16647: Redefining $/ causes irb to misbehave
https://bugs.ruby-lang.org/issues/16647#change-84355

* Author: mehagar (Michael Hagar)
* Status: Open
* Priority: Normal
* ruby -v: ruby 2.7.0p0 (2019-12-25 revision 647ee6f091) [x86_64-darwin19]
* Backport: 2.5: UNKNOWN, 2.6: UNKNOWN, 2.7: UNKNOWN
----------------------------------------
If I start irb and then do:

``` ruby
$/ = "asdf"
```


then every character I type shows a newline on the irb console. Previous versions of ruby do not have this behavior, and it is annoying.



-- 
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>