diff options
| author | Max Howell | 2010-06-05 12:29:37 +0100 |
|---|---|---|
| committer | Max Howell | 2012-03-09 12:08:52 +0000 |
| commit | 7a193f39b75fa97f930545125a9ae24b92a605e7 (patch) | |
| tree | 6a684fbce03ee174e4ef96c560f9d3d6972a1c27 | |
| parent | 97b5808cac7940f35eaaa5f9a66fcb5a6795e1d4 (diff) | |
| download | brew-7a193f39b75fa97f930545125a9ae24b92a605e7.tar.bz2 | |
Support Ruby < 1.8.7
| -rw-r--r-- | install_homebrew.rb | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/install_homebrew.rb b/install_homebrew.rb index 6dcd4113e..7cc91f7b1 100644 --- a/install_homebrew.rb +++ b/install_homebrew.rb @@ -72,7 +72,11 @@ end def getc # NOTE only tested on OS X system "/bin/stty raw -echo" - STDIN.getbyte + if RUBY_VERSION >= '1.8.7' + STDIN.getbyte + else + STDIN.getc + end ensure system "/bin/stty -raw echo" end |
