summaryrefslogtreecommitdiff
path: root/ext/io/console/lib
diff options
context:
space:
mode:
authornobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2013-05-24 06:54:25 +0000
committernobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2013-05-24 06:54:25 +0000
commit755f669316b5d1ea5c618754e7c432ac1baf5b0e (patch)
treeafe9157100c6dc884c3a1a5e18100ec9aebe1732 /ext/io/console/lib
parentdb41a18845d1578797a2b5baab6d9cbb76e29e42 (diff)
io/console: rdoc
* ext/io/console/console.c (io_getch): add rdoc. * ext/io/console/lib/console/size.rb (IO.console_size): ditto. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@40911 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'ext/io/console/lib')
-rw-r--r--ext/io/console/lib/console/size.rb2
1 files changed, 2 insertions, 0 deletions
diff --git a/ext/io/console/lib/console/size.rb b/ext/io/console/lib/console/size.rb
index e9d8a1fbb6..519bc3be6d 100644
--- a/ext/io/console/lib/console/size.rb
+++ b/ext/io/console/lib/console/size.rb
@@ -1,3 +1,4 @@
+# fallback to console window size
def IO.default_console_size
[
ENV["LINES"].to_i.nonzero? || 25,
@@ -12,6 +13,7 @@ rescue LoadError
alias console_size default_console_size
end
else
+ # returns console window size
def IO.console_size
console.winsize
rescue NoMethodError