matz
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@929 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
parent
a509e67c5a
commit
6fc752bf7d
36
ChangeLog
36
ChangeLog
@ -1,7 +1,41 @@
|
|||||||
Mon Sep 4 12:58:31 2000 Yukihiro Matsumoto <matz@ruby-lang.org>
|
Wed Sep 6 17:06:59 2000 Yukihiro Matsumoto <matz@ruby-lang.org>
|
||||||
|
|
||||||
* stable version 1.6.0 released.
|
* stable version 1.6.0 released.
|
||||||
|
|
||||||
|
Thu Sep 7 14:17:51 2000 Yukihiro Matsumoto <matz@ruby-lang.org>
|
||||||
|
|
||||||
|
* string.c (rb_str_cat): should work even for concatenating same
|
||||||
|
string.
|
||||||
|
|
||||||
|
Wed Sep 6 17:06:38 2000 Yukihiro Matsumoto <matz@ruby-lang.org>
|
||||||
|
|
||||||
|
* variable.c (rb_cvar_declare): should check superclass's class
|
||||||
|
variable first.
|
||||||
|
|
||||||
|
Wed Sep 6 10:42:02 2000 Yukihiro Matsumoto <matz@ruby-lang.org>
|
||||||
|
|
||||||
|
* misc/ruby-mode.el (ruby-calculate-indent): shift continuing line
|
||||||
|
if previous line ends with modifier keyword.
|
||||||
|
|
||||||
|
* misc/ruby-mode.el (ruby-parse-region): should not give up if
|
||||||
|
modifiers are at the end of line.
|
||||||
|
|
||||||
|
* misc/ruby-mode.el (ruby-expr-beg): indented wrongly if modified
|
||||||
|
statement was size 1.
|
||||||
|
|
||||||
|
Wed Sep 6 10:41:19 2000 Kenichi Komiya <kom@mail1.accsnet.ne.jp>
|
||||||
|
|
||||||
|
* misc/ruby-mode.el (ruby-parse-region): modifier was not handled
|
||||||
|
well on emacs19.
|
||||||
|
|
||||||
|
Tue Sep 5 17:10:12 2000 Yukihiro Matsumoto <matz@ruby-lang.org>
|
||||||
|
|
||||||
|
* time.c (time_to_s): fixed zone string UTC for utc time object.
|
||||||
|
|
||||||
|
Tue Sep 5 00:26:06 2000 Yukihiro Matsumoto <matz@ruby-lang.org>
|
||||||
|
|
||||||
|
* regex.c (re_search): range worked wrongly on bm_search().
|
||||||
|
|
||||||
Mon Sep 4 13:40:40 2000 WATANABE Hirofumi <eban@os.rim.or.jp>
|
Mon Sep 4 13:40:40 2000 WATANABE Hirofumi <eban@os.rim.or.jp>
|
||||||
|
|
||||||
* configure.in: renamed libruby.a to libruby.{cygwin,mingw32}.a
|
* configure.in: renamed libruby.a to libruby.{cygwin,mingw32}.a
|
||||||
|
1
ToDo
1
ToDo
@ -91,6 +91,7 @@ Standard Libraries
|
|||||||
* introduce Boolean class; super of TrueClass, FalseClass
|
* introduce Boolean class; super of TrueClass, FalseClass
|
||||||
* Process::waitall [ruby-talk:4557]
|
* Process::waitall [ruby-talk:4557]
|
||||||
* synchronized method - synchronized{...}, synchronized :foo, :bar
|
* synchronized method - synchronized{...}, synchronized :foo, :bar
|
||||||
|
* move Time::times to Process.
|
||||||
|
|
||||||
Extension Libraries
|
Extension Libraries
|
||||||
|
|
||||||
|
@ -51,7 +51,14 @@ class CGI
|
|||||||
@dbman = dbman::new(self, option)
|
@dbman = dbman::new(self, option)
|
||||||
request.instance_eval do
|
request.instance_eval do
|
||||||
@output_hidden = {session_key => id}
|
@output_hidden = {session_key => id}
|
||||||
@output_cookies = [Cookie::new(session_key,id)]
|
@output_cookies = [
|
||||||
|
Cookie::new(session_key => id,
|
||||||
|
"path" => if ENV["SCRIPT_NAME"] then
|
||||||
|
File::dirname(ENV["SCRIPT_NAME"])
|
||||||
|
else
|
||||||
|
""
|
||||||
|
end)
|
||||||
|
]
|
||||||
end
|
end
|
||||||
ObjectSpace::define_finalizer(self, Session::callback(@dbman))
|
ObjectSpace::define_finalizer(self, Session::callback(@dbman))
|
||||||
end
|
end
|
||||||
|
@ -32,7 +32,7 @@
|
|||||||
# finalize all dependants connected by dependency R_*(obj, dependtant).
|
# finalize all dependants connected by dependency R_*(obj, dependtant).
|
||||||
# finalize_by_dependant(dependant, method = :finalize)
|
# finalize_by_dependant(dependant, method = :finalize)
|
||||||
# finalize the dependant connected by dependency R_method(*, dependtant).
|
# finalize the dependant connected by dependency R_method(*, dependtant).
|
||||||
# fainalize_all_by_dependant(dependant)
|
# finalize_all_by_dependant(dependant)
|
||||||
# finalize all dependants connected by dependency R_*(*, dependant).
|
# finalize all dependants connected by dependency R_*(*, dependant).
|
||||||
# finalize_all
|
# finalize_all
|
||||||
# finalize all dependency registered to the Finalizer.
|
# finalize all dependency registered to the Finalizer.
|
||||||
@ -138,7 +138,7 @@ module Finalizer
|
|||||||
end
|
end
|
||||||
|
|
||||||
# finalize all dependants connected by dependency R_*(*, dependtant)
|
# finalize all dependants connected by dependency R_*(*, dependtant)
|
||||||
def fainalize_all_by_dependant(dependant)
|
def finalize_all_by_dependant(dependant)
|
||||||
for id in @dependency.keys
|
for id in @dependency.keys
|
||||||
finalize_all_dependency(id, dependant)
|
finalize_all_dependency(id, dependant)
|
||||||
end
|
end
|
||||||
@ -190,7 +190,7 @@ module Finalizer
|
|||||||
module_function :finalize_dependency
|
module_function :finalize_dependency
|
||||||
module_function :finalize_all_dependency
|
module_function :finalize_all_dependency
|
||||||
module_function :finalize_by_dependant
|
module_function :finalize_by_dependant
|
||||||
module_function :fainalize_all_by_dependant
|
module_function :finalize_all_by_dependant
|
||||||
module_function :finalize_all
|
module_function :finalize_all
|
||||||
|
|
||||||
module_function :safe
|
module_function :safe
|
||||||
|
@ -37,6 +37,10 @@
|
|||||||
"and\\|or\\|not"
|
"and\\|or\\|not"
|
||||||
)
|
)
|
||||||
|
|
||||||
|
(defconst ruby-block-hanging-re
|
||||||
|
(concat ruby-modifier-re "\\|" ruby-block-op-re)
|
||||||
|
)
|
||||||
|
|
||||||
(defconst ruby-block-end-re "end")
|
(defconst ruby-block-end-re "end")
|
||||||
|
|
||||||
(defconst ruby-delimiter
|
(defconst ruby-delimiter
|
||||||
@ -224,30 +228,30 @@ The variable ruby-indent-level controls the amount of indentation.
|
|||||||
|
|
||||||
(defun ruby-expr-beg (&optional option)
|
(defun ruby-expr-beg (&optional option)
|
||||||
(save-excursion
|
(save-excursion
|
||||||
(if (looking-at "\\?")
|
(store-match-data nil)
|
||||||
(progn
|
(skip-chars-backward " \t")
|
||||||
(or (bolp) (forward-char -1))
|
(cond
|
||||||
(not (looking-at "\\sw")))
|
((bolp) t)
|
||||||
(store-match-data nil)
|
((looking-at "\\?")
|
||||||
(skip-chars-backward " \t")
|
|
||||||
(or (bolp) (forward-char -1))
|
(or (bolp) (forward-char -1))
|
||||||
(or (bolp)
|
(not (looking-at "\\sw")))
|
||||||
(looking-at ruby-operator-re)
|
(t
|
||||||
(looking-at "[\\[({]")
|
(forward-char -1)
|
||||||
|
(or (looking-at ruby-operator-re)
|
||||||
|
(looking-at "[\\[({,;]")
|
||||||
(and (not (eq option 'modifier))
|
(and (not (eq option 'modifier))
|
||||||
(looking-at "[!?]"))
|
(looking-at "[!?]"))
|
||||||
(and (looking-at ruby-symbol-re)
|
(and (looking-at ruby-symbol-re)
|
||||||
(skip-chars-backward ruby-symbol-chars)
|
(skip-chars-backward ruby-symbol-chars)
|
||||||
(if (and (not (eq option 'modifier)) (bolp))
|
(cond
|
||||||
t
|
((or (looking-at ruby-block-beg-re)
|
||||||
(if (or (looking-at ruby-block-beg-re)
|
(looking-at ruby-block-op-re)
|
||||||
(looking-at ruby-block-op-re)
|
(looking-at ruby-block-mid-re))
|
||||||
(looking-at ruby-block-mid-re))
|
(goto-char (match-end 0))
|
||||||
(progn
|
(looking-at "\\>"))
|
||||||
(goto-char (match-end 0))
|
(t
|
||||||
(looking-at "\\>"))
|
(and (not (eq option 'expr-arg))
|
||||||
(and (not (eq option 'expr-arg))
|
(looking-at "[a-zA-Z][a-zA-z0-9_]* +/[^ \t]"))))))))))
|
||||||
(looking-at "[a-zA-Z][a-zA-z0-9_]* +/[^ \t]")))))))))
|
|
||||||
|
|
||||||
(defun ruby-parse-region (start end)
|
(defun ruby-parse-region (start end)
|
||||||
(let ((indent-point end)
|
(let ((indent-point end)
|
||||||
@ -375,11 +379,12 @@ The variable ruby-indent-level controls the amount of indentation.
|
|||||||
(setq depth (1+ depth))))
|
(setq depth (1+ depth))))
|
||||||
(goto-char (match-end 0)))
|
(goto-char (match-end 0)))
|
||||||
((looking-at ruby-block-beg-re)
|
((looking-at ruby-block-beg-re)
|
||||||
(and
|
(and
|
||||||
(or (not (looking-at "do\\>[^_]"))
|
(save-match-data
|
||||||
(save-excursion
|
(or (not (looking-at "do\\>[^_]"))
|
||||||
(back-to-indentation)
|
(save-excursion
|
||||||
(not (looking-at ruby-non-block-do-re))))
|
(back-to-indentation)
|
||||||
|
(not (looking-at ruby-non-block-do-re)))))
|
||||||
(or (bolp)
|
(or (bolp)
|
||||||
(progn
|
(progn
|
||||||
(forward-char -1)
|
(forward-char -1)
|
||||||
@ -392,42 +397,9 @@ The variable ruby-indent-level controls the amount of indentation.
|
|||||||
(not (eq ?! w))
|
(not (eq ?! w))
|
||||||
(not (eq ?? w))
|
(not (eq ?? w))
|
||||||
(skip-chars-forward " \t")
|
(skip-chars-forward " \t")
|
||||||
(if (not (eolp))
|
(goto-char (match-beginning 0))
|
||||||
(progn
|
(or (not (looking-at ruby-modifier-re))
|
||||||
(goto-char (match-beginning 0))
|
(ruby-expr-beg 'modifier))
|
||||||
(if (looking-at ruby-modifier-re)
|
|
||||||
(ruby-expr-beg 'modifier)
|
|
||||||
t))
|
|
||||||
t)
|
|
||||||
(goto-char pnt)
|
|
||||||
(setq nest (cons (cons nil pnt) nest))
|
|
||||||
(setq depth (1+ depth)))
|
|
||||||
(goto-char pnt))
|
|
||||||
((looking-at ruby-block-beg-re)
|
|
||||||
(and
|
|
||||||
(or (not (looking-at "do\\>[^_]"))
|
|
||||||
(save-excursion
|
|
||||||
(back-to-indentation)
|
|
||||||
(not (looking-at ruby-non-block-do-re))))
|
|
||||||
(or (bolp)
|
|
||||||
(progn
|
|
||||||
(forward-char -1)
|
|
||||||
(setq w (char-after (point)))
|
|
||||||
(not (or (eq ?_ w)
|
|
||||||
(eq ?. w)))))
|
|
||||||
(goto-char pnt)
|
|
||||||
(setq w (char-after (point)))
|
|
||||||
(not (eq ?_ w))
|
|
||||||
(not (eq ?! w))
|
|
||||||
(not (eq ?? w))
|
|
||||||
(skip-chars-forward " \t")
|
|
||||||
(if (not (eolp))
|
|
||||||
(progn
|
|
||||||
(goto-char (match-beginning 0))
|
|
||||||
(if (looking-at ruby-modifier-re)
|
|
||||||
(ruby-expr-beg 'modifier)
|
|
||||||
t))
|
|
||||||
t)
|
|
||||||
(goto-char pnt)
|
(goto-char pnt)
|
||||||
(setq nest (cons (cons nil pnt) nest))
|
(setq nest (cons (cons nil pnt) nest))
|
||||||
(setq depth (1+ depth)))
|
(setq depth (1+ depth)))
|
||||||
@ -560,7 +532,8 @@ The variable ruby-indent-level controls the amount of indentation.
|
|||||||
(and
|
(and
|
||||||
(or (and (looking-at ruby-symbol-re)
|
(or (and (looking-at ruby-symbol-re)
|
||||||
(skip-chars-backward ruby-symbol-chars)
|
(skip-chars-backward ruby-symbol-chars)
|
||||||
(looking-at ruby-block-op-re)
|
(looking-at ruby-block-hanging-re)
|
||||||
|
(not (eq (point) (nth 3 state)))
|
||||||
(save-excursion
|
(save-excursion
|
||||||
(goto-char (match-end 0))
|
(goto-char (match-end 0))
|
||||||
(not (looking-at "[a-z_]"))))
|
(not (looking-at "[a-z_]"))))
|
||||||
|
1
node.h
1
node.h
@ -101,7 +101,6 @@ enum node_type {
|
|||||||
NODE_SCLASS,
|
NODE_SCLASS,
|
||||||
NODE_COLON2,
|
NODE_COLON2,
|
||||||
NODE_COLON3,
|
NODE_COLON3,
|
||||||
NODE_CNAME,
|
|
||||||
NODE_CREF,
|
NODE_CREF,
|
||||||
NODE_DOT2,
|
NODE_DOT2,
|
||||||
NODE_DOT3,
|
NODE_DOT3,
|
||||||
|
3
regex.c
3
regex.c
@ -3137,7 +3137,7 @@ re_search(bufp, string, size, startpos, range, regs)
|
|||||||
|
|
||||||
/* If the search isn't to be a backwards one, don't waste time in a
|
/* If the search isn't to be a backwards one, don't waste time in a
|
||||||
search for a pattern that must be anchored. */
|
search for a pattern that must be anchored. */
|
||||||
if (bufp->used>0) {
|
if (bufp->used > 0) {
|
||||||
switch ((enum regexpcode)bufp->buffer[0]) {
|
switch ((enum regexpcode)bufp->buffer[0]) {
|
||||||
case begbuf:
|
case begbuf:
|
||||||
begbuf_match:
|
begbuf_match:
|
||||||
@ -3196,6 +3196,7 @@ re_search(bufp, string, size, startpos, range, regs)
|
|||||||
if (range > 0 && (bufp->options & RE_OPTIMIZE_EXACTN)) {
|
if (range > 0 && (bufp->options & RE_OPTIMIZE_EXACTN)) {
|
||||||
startpos += pos;
|
startpos += pos;
|
||||||
range -= pos;
|
range -= pos;
|
||||||
|
if (range < 0) return -1;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
10
string.c
10
string.c
@ -427,10 +427,18 @@ rb_str_cat(str, ptr, len)
|
|||||||
long len;
|
long len;
|
||||||
{
|
{
|
||||||
if (len > 0) {
|
if (len > 0) {
|
||||||
|
int poffset = -1;
|
||||||
|
|
||||||
rb_str_modify(str);
|
rb_str_modify(str);
|
||||||
|
if (RSTRING(str)->ptr <= ptr &&
|
||||||
|
ptr < RSTRING(str)->ptr + RSTRING(str)->len) {
|
||||||
|
poffset = ptr - RSTRING(str)->ptr;
|
||||||
|
}
|
||||||
REALLOC_N(RSTRING(str)->ptr, char, RSTRING(str)->len + len + 1);
|
REALLOC_N(RSTRING(str)->ptr, char, RSTRING(str)->len + len + 1);
|
||||||
if (ptr)
|
if (ptr) {
|
||||||
|
if (poffset >= 0) ptr = RSTRING(str)->ptr + poffset;
|
||||||
memcpy(RSTRING(str)->ptr + RSTRING(str)->len, ptr, len);
|
memcpy(RSTRING(str)->ptr + RSTRING(str)->len, ptr, len);
|
||||||
|
}
|
||||||
RSTRING(str)->len += len;
|
RSTRING(str)->len += len;
|
||||||
RSTRING(str)->ptr[RSTRING(str)->len] = '\0'; /* sentinel */
|
RSTRING(str)->ptr[RSTRING(str)->len] = '\0'; /* sentinel */
|
||||||
}
|
}
|
||||||
|
7
time.c
7
time.c
@ -633,13 +633,10 @@ time_to_s(time)
|
|||||||
if (tobj->tm_got == 0) {
|
if (tobj->tm_got == 0) {
|
||||||
time_get_tm(time, tobj->gmt);
|
time_get_tm(time, tobj->gmt);
|
||||||
}
|
}
|
||||||
#ifndef HAVE_TM_ZONE
|
|
||||||
if (tobj->gmt == 1) {
|
if (tobj->gmt == 1) {
|
||||||
len = strftime(buf, 128, "%a %b %d %H:%M:%S GMT %Y", &tobj->tm);
|
len = strftime(buf, 128, "%a %b %d %H:%M:%S UTC %Y", &tobj->tm);
|
||||||
}
|
}
|
||||||
else
|
else {
|
||||||
#endif
|
|
||||||
{
|
|
||||||
len = strftime(buf, 128, "%a %b %d %H:%M:%S %Z %Y", &tobj->tm);
|
len = strftime(buf, 128, "%a %b %d %H:%M:%S %Z %Y", &tobj->tm);
|
||||||
}
|
}
|
||||||
return rb_str_new(buf, len);
|
return rb_str_new(buf, len);
|
||||||
|
17
variable.c
17
variable.c
@ -1332,11 +1332,11 @@ rb_cvar_set(klass, id, val)
|
|||||||
{
|
{
|
||||||
VALUE tmp;
|
VALUE tmp;
|
||||||
|
|
||||||
if (!OBJ_TAINTED(klass) && rb_safe_level() >= 4)
|
|
||||||
rb_raise(rb_eSecurityError, "Insecure: can't modify class variable");
|
|
||||||
tmp = klass;
|
tmp = klass;
|
||||||
while (tmp) {
|
while (tmp) {
|
||||||
if (RCLASS(tmp)->iv_tbl && st_lookup(RCLASS(tmp)->iv_tbl,id,0)) {
|
if (RCLASS(tmp)->iv_tbl && st_lookup(RCLASS(tmp)->iv_tbl,id,0)) {
|
||||||
|
if (!OBJ_TAINTED(tmp) && rb_safe_level() >= 4)
|
||||||
|
rb_raise(rb_eSecurityError, "Insecure: can't modify class variable");
|
||||||
st_insert(RCLASS(tmp)->iv_tbl,id,val);
|
st_insert(RCLASS(tmp)->iv_tbl,id,val);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
@ -1353,6 +1353,19 @@ rb_cvar_declare(klass, id, val)
|
|||||||
ID id;
|
ID id;
|
||||||
VALUE val;
|
VALUE val;
|
||||||
{
|
{
|
||||||
|
VALUE tmp;
|
||||||
|
|
||||||
|
tmp = klass;
|
||||||
|
while (tmp) {
|
||||||
|
if (RCLASS(tmp)->iv_tbl && st_lookup(RCLASS(tmp)->iv_tbl,id,0)) {
|
||||||
|
if (!OBJ_TAINTED(tmp) && rb_safe_level() >= 4)
|
||||||
|
rb_raise(rb_eSecurityError, "Insecure: can't modify class variable");
|
||||||
|
st_insert(RCLASS(tmp)->iv_tbl,id,val);
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
tmp = RCLASS(tmp)->super;
|
||||||
|
}
|
||||||
|
|
||||||
mod_av_set(klass, id, val, "class variable", Qfalse);
|
mod_av_set(klass, id, val, "class variable", Qfalse);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
#define RUBY_VERSION "1.6.0"
|
#define RUBY_VERSION "1.6.0"
|
||||||
#define RUBY_RELEASE_DATE "2000-09-04"
|
#define RUBY_RELEASE_DATE "2000-09-07"
|
||||||
#define RUBY_VERSION_CODE 160
|
#define RUBY_VERSION_CODE 160
|
||||||
#define RUBY_RELEASE_CODE 20000904
|
#define RUBY_RELEASE_CODE 20000907
|
||||||
|
Loading…
x
Reference in New Issue
Block a user