1
0
Fork 0
mirror of https://github.com/ruby/ruby.git synced 2022-11-09 12:17:21 -05:00

* eval.c (ruby_init): set ruby_running to true after

initialization.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@4080 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
matz 2003-07-17 05:23:54 +00:00
parent 06f82d3883
commit 46bf621737
6 changed files with 31 additions and 14 deletions

View file

@ -1,3 +1,8 @@
Thu Jul 17 13:46:25 2003 Yukihiro Matsumoto <matz@ruby-lang.org>
* eval.c (ruby_init): set ruby_running to true after
initialization.
Thu Jul 17 13:42:53 2003 WATANABE Hirofumi <eban@ruby-lang.org>
* lib/ftools.rb (File::makedirs): do not handle "//" as a directory.

3
eval.c
View file

@ -365,7 +365,6 @@ rb_get_method_body(klassp, idp, noexp)
if (ruby_running) {
/* store in cache */
if (BUILTIN_TYPE(origin) == T_ICLASS) origin = RBASIC(origin)->klass;
ent = cache + EXPR1(klass, id);
ent->klass = klass;
ent->noex = body->nd_noex;
@ -1200,6 +1199,7 @@ ruby_init()
}
POP_SCOPE();
ruby_scope = top_scope;
ruby_running = 1;
}
static VALUE
@ -1365,7 +1365,6 @@ ruby_exec()
volatile NODE *tmp;
Init_stack((void*)&tmp);
ruby_running = 1;
PUSH_TAG(PROT_NONE);
PUSH_ITER(ITER_NOT);
/* default visibility is private at toplevel */

View file

@ -324,7 +324,7 @@ module TkComm
return '' if cmd == ''
id = _next_cmd_id
Tk_CMDTBL[id] = cmd
@cmdtbl = [] unless @cmdtbl
@cmdtbl = [] unless defined? @cmdtbl
@cmdtbl.push id
return format("rb_out %s", id);
end
@ -859,10 +859,6 @@ module TkCore
tk_call 'tk_getSaveFile', *hash_kv(keys)
end
def chooseDirectory(keys = nil)
tk_call 'tk_chooseDIrectory', *hash_kv(keys)
end
def chooseColor(keys = nil)
tk_call 'tk_chooseColor', *hash_kv(keys)
end
@ -1385,7 +1381,7 @@ if /^8\.[1-9]/ =~ Tk::TCL_VERSION && !Tk::JAPANIZED_TK
attr_accessor :encoding
def _eval(cmd)
if @encoding
if defined? @encoding
_fromUTF8(__eval(_toUTF8(cmd, @encoding)), @encoding)
else
__eval(cmd)
@ -1393,7 +1389,7 @@ if /^8\.[1-9]/ =~ Tk::TCL_VERSION && !Tk::JAPANIZED_TK
end
def _invoke(*cmds)
if @encoding
if defined? @encoding
cmds = cmds.collect{|cmd| _toUTF8(cmd, @encoding)}
_fromUTF8(__invoke(*cmds), @encoding)
else
@ -1505,8 +1501,6 @@ class TkBindTag
}
end
ALL = self.new_by_name('all')
def initialize(*args, &b)
@id = Tk_BINDTAG_ID[0]
Tk_BINDTAG_ID[0] = Tk_BINDTAG_ID[0].succ
@ -1514,6 +1508,8 @@ class TkBindTag
bind(*args, &b) if args != []
end
ALL = self.new_by_name('all')
def name
@id
end

1
gc.c
View file

@ -1109,6 +1109,7 @@ obj_free(obj)
}
break;
case T_ICLASS:
rb_clear_cache_by_class((VALUE)obj);
/* iClass shares table with the module */
break;

View file

@ -18,11 +18,11 @@ rescue LoadError
module REXML
module Encoding
def from_euc_jp(str)
return Iconv::iconv("utf-8", "euc-jp", str).join
return Iconv::iconv("utf-8", "euc-jp", str).join('')
end
def to_euc_jp content
return Iconv::iconv("euc-jp", "utf-8", content).join
return Iconv::iconv("euc-jp", "utf-8", content).join('')
end
end
end

View file

@ -13,5 +13,21 @@ begin
end
end
rescue LoadError
raise "uconv is required for Japanese encoding support."
begin
require 'iconv'
module REXML
module Encoding
def from_shift_jis(str)
return Iconv::iconv("utf-8", "shift_jis", str).join('')
end
def to_shift_jis content
return Iconv::iconv("shift_jis", "utf-8", content).join('')
end
end
end
rescue LoadError
raise "uconv or iconv is required for Japanese encoding support."
end
end