Skip to content

Commit

Permalink
Trying a fix for the Window loading error.
Browse files Browse the repository at this point in the history
  • Loading branch information
JEG2 committed Mar 10, 2011
1 parent a7a2a36 commit 63bc54d
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 0 deletions.
1 change: 1 addition & 0 deletions CHANGELOG
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ Below is a complete listing of changes for each revision of HighLine.

* Correctly handle STDIN being closed before we receive any data (fix by
mleinart).
* Try if msvcrt, if we can't load crtdll on Windows (fix by pepijnve).

== 1.6.1

Expand Down
2 changes: 2 additions & 0 deletions lib/highline/system_extensions.rb
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,8 @@ module SystemExtensions
#
def get_character( input = STDIN )
Win32API.new("crtdll", "_getch", [ ], "L").Call
rescue Exception
Win32API.new("msvcrt", "_getch", [ ], "L").Call
end

# A Windows savvy method to fetch the console columns, and rows.
Expand Down

0 comments on commit 63bc54d

Please sign in to comment.