summaryrefslogtreecommitdiff
path: root/ext
diff options
context:
space:
mode:
authorakr <akr@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2012-02-20 12:10:00 +0000
committerakr <akr@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2012-02-20 12:10:00 +0000
commit83f742f86fd20527b5568dca7bdf2b251c511f55 (patch)
tree197f0231535cd14b986bf328f76c4d1f245873fc /ext
parent9f6f0788d29e5883bd45f5f4e326e5a9ea9f12bf (diff)
* ext/curses/curses.c (Init_curses): define Curses::VERSION.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@34705 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'ext')
-rw-r--r--ext/curses/curses.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/ext/curses/curses.c b/ext/curses/curses.c
index fa4b279e26..6045e31d60 100644
--- a/ext/curses/curses.c
+++ b/ext/curses/curses.c
@@ -2768,6 +2768,12 @@ Init_curses(void)
rb_define_module_function(mCurses, "def_prog_mode", curses_def_prog_mode, 0);
rb_define_module_function(mCurses, "reset_prog_mode", curses_reset_prog_mode, 0);
+#ifdef NCURSES_VERSION
+ rb_define_const(mCurses, "VERSION", rb_sprintf("ncurses %s", NCURSES_VERSION));
+#else
+ rb_define_const(mCurses, "VERSION", rb_str_new2("unknown"));
+#endif
+
/*
* Document-class: Curses::Window
*