зеркало из https://github.com/github/ruby.git
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@838 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
Родитель
448e63d627
Коммит
741ca76912
|
@ -1,3 +1,10 @@
|
|||
Tue Jul 18 14:58:30 2000 Yukihiro Matsumoto <matz@netlab.co.jp>
|
||||
|
||||
* eval.c (ruby_options): should treat SystemExit etc. properly.
|
||||
|
||||
* parse.y (yycompile): should check compile_for_eval, not
|
||||
ruby_in_eval.
|
||||
|
||||
Mon Jul 17 04:29:50 2000 Minero Aoki <aamine@dp.u-netsurf.ne.jp>
|
||||
|
||||
* lib/mkmf.rb: converts extention of $objs into $OBJEXT.
|
||||
|
|
39
eval.c
39
eval.c
|
@ -1002,26 +1002,6 @@ ruby_init()
|
|||
ruby_scope = top_scope;
|
||||
}
|
||||
|
||||
void
|
||||
ruby_options(argc, argv)
|
||||
int argc;
|
||||
char **argv;
|
||||
{
|
||||
int state;
|
||||
|
||||
PUSH_TAG(PROT_NONE)
|
||||
if ((state = EXEC_TAG()) == 0) {
|
||||
ruby_process_options(argc, argv);
|
||||
}
|
||||
POP_TAG();
|
||||
if (state) {
|
||||
trace_func = 0;
|
||||
tracing = 0;
|
||||
error_print();
|
||||
exit(1);
|
||||
}
|
||||
}
|
||||
|
||||
static VALUE
|
||||
eval_node(self)
|
||||
VALUE self;
|
||||
|
@ -1099,6 +1079,25 @@ error_handle(ex)
|
|||
return ex;
|
||||
}
|
||||
|
||||
void
|
||||
ruby_options(argc, argv)
|
||||
int argc;
|
||||
char **argv;
|
||||
{
|
||||
int state;
|
||||
|
||||
PUSH_TAG(PROT_NONE)
|
||||
if ((state = EXEC_TAG()) == 0) {
|
||||
ruby_process_options(argc, argv);
|
||||
}
|
||||
POP_TAG();
|
||||
if (state) {
|
||||
trace_func = 0;
|
||||
tracing = 0;
|
||||
exit(error_handle(state));
|
||||
}
|
||||
}
|
||||
|
||||
void
|
||||
ruby_run()
|
||||
{
|
||||
|
|
|
@ -500,5 +500,3 @@ module Math
|
|||
module_function :atanh!
|
||||
|
||||
end
|
||||
|
||||
|
||||
|
|
|
@ -578,6 +578,7 @@ EOHELP
|
|||
end
|
||||
|
||||
def excn_handle(file, line, id, binding)
|
||||
p $!
|
||||
if $!.type <= SystemExit
|
||||
set_trace_func nil
|
||||
exit
|
||||
|
|
|
@ -38,9 +38,9 @@
|
|||
#=end
|
||||
|
||||
require 'timeout'
|
||||
require "socket"
|
||||
|
||||
module Ping
|
||||
require "socket"
|
||||
def pingecho(host, timeout=5, service="echo")
|
||||
begin
|
||||
timeout(timeout) do
|
||||
|
|
|
@ -43,8 +43,8 @@ class WeakRef<Delegator
|
|||
def initialize(orig)
|
||||
super
|
||||
@__id = orig.__id__
|
||||
ObjectSpace.define_finalizer orig, @@final
|
||||
ObjectSpace.defin_finalizer self, @@final
|
||||
ObjectSpace.define_finalizer orig, @@final
|
||||
ObjectSpace.define_finalizer self, @@final
|
||||
ID_MAP[@__id] = [] unless ID_MAP[@__id]
|
||||
ID_MAP[@__id].push self.__id__
|
||||
ID_REV_MAP[self.id] = @__id
|
||||
|
|
2
parse.y
2
parse.y
|
@ -1859,7 +1859,7 @@ yycompile(f, line)
|
|||
{
|
||||
int n;
|
||||
|
||||
if (!ruby_in_eval && rb_safe_level() == 0 &&
|
||||
if (!compile_for_eval && rb_safe_level() == 0 &&
|
||||
rb_const_defined(rb_cObject, rb_intern("SCRIPT_LINES__"))) {
|
||||
VALUE hash, fname;
|
||||
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
#! /usr/bin/env ruby
|
||||
|
||||
# cal.rb: Written by Tadayoshi Funaba 1998-2000
|
||||
# $Id: cal.rb,v 1.10 2000/05/20 02:09:47 tadf Exp $
|
||||
# $Id: cal.rb,v 1.11 2000-07-16 10:28:50+09 tadf Exp $
|
||||
|
||||
require 'date2'
|
||||
require 'getopts'
|
||||
|
@ -38,7 +38,7 @@ end
|
|||
|
||||
def pict(y, m, sg)
|
||||
d = (1..31).detect{|d| Date.exist?(y, m, d, sg)}
|
||||
fi = Date.new3(y, m, d, sg)
|
||||
fi = Date.new(y, m, d, sg)
|
||||
fi -= (fi.jd - $k + 1) % 7
|
||||
|
||||
ve = (fi..fi + 6).collect{|cu|
|
||||
|
@ -54,9 +54,8 @@ def pict(y, m, sg)
|
|||
gr = trans(gr) if $OPT_t
|
||||
ta = gr.collect{|xs| xs.join(' ')}
|
||||
|
||||
ca = %w(January February March April
|
||||
May June July August
|
||||
September October November December)[m - 1]
|
||||
ca = %w(January February March April May June July
|
||||
August September October November December)[m - 1]
|
||||
ca = ca + ' ' + y.to_s if not $OPT_y
|
||||
ca = ca.center($mw)
|
||||
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
#! /usr/local/bin/ruby
|
||||
#! /usr/bin/env ruby
|
||||
|
||||
# goodfriday.rb: Written by Tadayoshi Funaba 1998
|
||||
# $Id: goodfriday.rb,v 1.1 1998/03/08 09:44:44 tadf Exp $
|
||||
# goodfriday.rb: Written by Tadayoshi Funaba 1998, 2000
|
||||
# $Id: goodfriday.rb,v 1.1.1.1 2000-07-16 10:25:30+09 tadf Exp $
|
||||
|
||||
require 'date2'
|
||||
|
||||
|
@ -19,7 +19,7 @@ def easter(y)
|
|||
if n <= 31 then [y, 3, n] else [y, 4, n - 31] end
|
||||
end
|
||||
|
||||
es = Date.new3(*easter(Time.now.year))
|
||||
es = Date.new(*easter(Time.now.year))
|
||||
[[-9*7, 'Septuagesima Sunday'],
|
||||
[-8*7, 'Sexagesima Sunday'],
|
||||
[-7*7, 'Quinquagesima Sunday (Shrove Sunday)'],
|
||||
|
|
Загрузка…
Ссылка в новой задаче