ConnorAtherton / rb-readline

Pure-Ruby Readline Implementation
BSD 3-Clause "New" or "Revised" License
248 stars 54 forks source link

use accessor methods for $stdin/out? #118

Open chino opened 9 years ago

chino commented 9 years ago

If accessor methods were added that simply return $stdin/out then anyone could easily be override those using various methods like Refinements and/or extended Classes?

Then hacky tricks like messing with $stdin globally wouldn't be needed.

For example see: http://www.simulacre.org/unblocking-readline-in-eventmachine

chino commented 9 years ago

Maybe accessor methods wouldn't even be the right technique but it would be nice to somehow be able to easily override these without affecting $stdin/out globally?