diff options
author | nagai <nagai@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2004-12-08 18:14:15 +0000 |
---|---|---|
committer | nagai <nagai@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2004-12-08 18:14:15 +0000 |
commit | b9bdee95f10922c0f4adbb51d2496c63d7d1ecdc (patch) | |
tree | e4586165010be9bac4462f8c53f267c126cdd041 /ext/tcltklib | |
parent | 642e10156c3554e2f1c922f0b3f6e0f8bd26ec16 (diff) | |
download | ruby-b9bdee95f10922c0f4adbb51d2496c63d7d1ecdc.tar.gz |
* ext/tcltklib/tcltklib.c (ip_init): set root-win title to "ruby" when
the running script is '-e one-liner' or '-' (stdin).
* ext/tcltklib/extconf.rb: add find_library("#{lib}#{ver}",..) for stub libs
* ext/tk/lib/tk/textmark.rb: TkTextMarkCurrent and TkTextMarkAnchor
have a wrong parent class.
* ext/tk/lib/tk/dialog.rb: rename TkDialog2 --> TkDialogObj and
TkWarning2 --> TkWarningObj (old names are changed to alias names)
* ext/tk/lib/tk/dialog.rb: bug fix of treatment of 'prev_command'
option and hashes for configuration
* ext/tk/lib/tk/dialog.rb: add TkDialogObj#name to return the button name
* ext/tk/lib/tk/radiobutton.rb: rename enbugged method value() ==> get_value()
and value=(val) ==> set_value(val).
* ext/tk/lib/tk/menu.rb: add TkMenu.new_menuspec
* ext/tk/lib/tk/menu.rb: add alias (TkMenuButton = TkMenubutton,
TkOptionMenuButton = TkOptionMenubutton)
* ext/tk/lib/tk/event.rb: new method aliases (same as option keys of
event_generate) for Event object
* ext/tk/lib/tk/font.rb: configinfo returns proper types of values
* ext/tk/lib/tk.rb: bind methods accept subst_args + block
* ext/tk/lib/tk/canvas.rb: ditto
* ext/tk/lib/tk/canvastag.rb: ditto
* ext/tk/lib/tk/frame.rb: ditto
* ext/tk/lib/tk/text.rb: ditto
* ext/tk/lib/tk/texttag.rb: ditto
* ext/tk/lib/tk/toplevel.rb: ditto
* ext/tk/lib/tkextlib/*: ditto and bug fix
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@7512 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'ext/tcltklib')
-rw-r--r-- | ext/tcltklib/extconf.rb | 8 | ||||
-rw-r--r-- | ext/tcltklib/tcltklib.c | 10 |
2 files changed, 14 insertions, 4 deletions
diff --git a/ext/tcltklib/extconf.rb b/ext/tcltklib/extconf.rb index 8ec34f0214..0635eea9e0 100644 --- a/ext/tcltklib/extconf.rb +++ b/ext/tcltklib/extconf.rb @@ -41,7 +41,9 @@ def find_tcl(tcllib, stubs) true else %w[8.5 8.4 8.3 8.2 8.1 8.0 7.6].find { |ver| - find_library("tcl#{ver}", func, *paths) or + find_library("#{lib}#{ver}", func, *paths) or + find_library("#{lib}#{ver.delete('.')}", func, *paths) or + find_library("tcl#{ver}", func, *paths) or find_library("tcl#{ver.delete('.')}", func, *paths) } end @@ -62,7 +64,9 @@ def find_tk(tklib, stubs) true else %w[8.5 8.4 8.3 8.2 8.1 8.0 4.2].find { |ver| - find_library("tk#{ver}", func, *paths) or + find_library("#{lib}#{ver}", func, *paths) or + find_library("#{lib}#{ver.delete('.')}", func, *paths) or + find_library("tk#{ver}", func, *paths) or find_library("tk#{ver.delete('.')}", func, *paths) } end diff --git a/ext/tcltklib/tcltklib.c b/ext/tcltklib/tcltklib.c index 67958d7beb..a80b4530f1 100644 --- a/ext/tcltklib/tcltklib.c +++ b/ext/tcltklib/tcltklib.c @@ -3461,8 +3461,14 @@ ip_init(argc, argv, self) case 1: /* argv0 */ if (!NIL_P(argv0)) { - /* Tcl_SetVar(ptr->ip, "argv0", StringValuePtr(argv0), 0); */ - Tcl_SetVar(ptr->ip, "argv0", StringValuePtr(argv0), TCL_GLOBAL_ONLY); + if (strncmp(StringValuePtr(argv0), "-e", 3) == 0 + || strncmp(StringValuePtr(argv0), "-", 2) == 0) { + Tcl_SetVar(ptr->ip, "argv0", "ruby", TCL_GLOBAL_ONLY); + } else { + /* Tcl_SetVar(ptr->ip, "argv0", StringValuePtr(argv0), 0); */ + Tcl_SetVar(ptr->ip, "argv0", StringValuePtr(argv0), + TCL_GLOBAL_ONLY); + } } case 0: /* no args */ |