summaryrefslogtreecommitdiff
path: root/ruby_1_8_5/ext/dl/sample/getch.rb
diff options
context:
space:
mode:
Diffstat (limited to 'ruby_1_8_5/ext/dl/sample/getch.rb')
-rw-r--r--ruby_1_8_5/ext/dl/sample/getch.rb5
1 files changed, 5 insertions, 0 deletions
diff --git a/ruby_1_8_5/ext/dl/sample/getch.rb b/ruby_1_8_5/ext/dl/sample/getch.rb
new file mode 100644
index 0000000000..3f7261c979
--- /dev/null
+++ b/ruby_1_8_5/ext/dl/sample/getch.rb
@@ -0,0 +1,5 @@
+require 'dl'
+
+crtdll = DL::dlopen("crtdll")
+getch = crtdll['_getch', 'L']
+print(getch.call, "\n")