summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authormatz <matz@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>1998-05-26 08:24:51 +0000
committermatz <matz@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>1998-05-26 08:24:51 +0000
commite6300774896d943115b3f51fa3489d3051f61eb4 (patch)
tree825c701fc7319cb5a34d8995525d917eaed5249d
parent0f34277fe50561c58c5c50881bbe234fbe8eafad (diff)
1.1b9_23
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/v1_1r@226 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
-rw-r--r--ChangeLog7
-rw-r--r--configure6
-rw-r--r--configure.in6
-rw-r--r--dln.c8
-rw-r--r--ext/extmk.rb.in7
-rw-r--r--file.c4
-rw-r--r--parse.y22
-rw-r--r--regex.c41
-rw-r--r--regex.h5
-rw-r--r--version.h4
10 files changed, 66 insertions, 44 deletions
diff --git a/ChangeLog b/ChangeLog
index 4c2786fe55..979f764c3e 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,10 @@
+Tue May 26 11:39:50 1998 Yukihiro Matsumoto <matz@netlab.co.jp>
+
+ * experimental release 1.1b9_23.
+
+ * parse.y (yylex): no UPLUS/UMINUS for 1st argument if
+ parenthesises are omitted.
+
Tue May 26 01:09:55 1998 Yukihiro Matsumoto <matz@netlab.co.jp>
* regex.c (re_compile_pattern): (?XI) for turns off the
diff --git a/configure b/configure
index b169a844dd..42f4d82a1e 100644
--- a/configure
+++ b/configure
@@ -3482,10 +3482,10 @@ echo "configure:3434: checking whether OS depend dynamic link works" >&5
beos*) LDSHARED="ld -xms"
case "$host_cpu" in
powerpc*)
- DLDFLAGS="-f ruby.def -lbe -lroot -ldll"
+ DLDFLAGS="-f ruby.exp -lbe -lroot glue-noinit.a init_term_dyn.o start_dyn.o"
;;
*)
- DLDFLAGS="ruby.def -lbe -lroot /boot/develop/lib/x86/glue-noinit.a"
+ DLDFLAGS="ruby.def -lbe -lroot glue-noinit.a init_term_dyn.o start_dyn.o"
;;
esac
rb_cv_dlopen=yes ;;
@@ -3862,7 +3862,7 @@ if test "$host_os" = "beos"; then
echo creating ruby.def
case "$host_cpu" in
powerpc*)
- cp beos/ruby.def.in ruby.def
+ cp beos/ruby.def.in ruby.exp
;;
*)
echo EXPORTS > ruby.def
diff --git a/configure.in b/configure.in
index 0b916f741d..946f4b876a 100644
--- a/configure.in
+++ b/configure.in
@@ -360,10 +360,10 @@ if test "$with_dln_a_out" != yes; then
beos*) LDSHARED="ld -xms"
case "$host_cpu" in
powerpc*)
- DLDFLAGS="-f ruby.def -lbe -lroot -ldll"
+ DLDFLAGS="-f ruby.exp -lbe -lroot glue-noinit.a init_term_dyn.o start_dyn.o"
;;
*)
- DLDFLAGS="ruby.def -lbe -lroot /boot/develop/lib/x86/glue-noinit.a"
+ DLDFLAGS="ruby.def -lbe -lroot glue-noinit.a init_term_dyn.o start_dyn.o"
;;
esac
rb_cv_dlopen=yes ;;
@@ -513,7 +513,7 @@ if test "$host_os" = "beos"; then
echo creating ruby.def
case "$host_cpu" in
powerpc*)
- cp beos/ruby.def.in ruby.def
+ cp beos/ruby.def.in ruby.exp
;;
*)
echo EXPORTS > ruby.def
diff --git a/dln.c b/dln.c
index f907ef30d5..67f9fd4be4 100644
--- a/dln.c
+++ b/dln.c
@@ -1365,6 +1365,14 @@ dln_load(file)
err_stat = get_image_symbol(img_id, buf,
B_SYMBOL_TYPE_TEXT, &init_fct);
+ if (err_stat != B_NO_ERROR) {
+ char real_name[1024];
+ strcpy(real_name, buf);
+ strcat(real_name, "__Fv");
+ err_stat = get_image_symbol(img_id, real_name,
+ B_SYMBOL_TYPE_TEXT, &init_fct);
+ }
+
if ((B_BAD_IMAGE_ID == err_stat) || (B_BAD_INDEX == err_stat)) {
unload_add_on(img_id);
LoadError("Failed to lookup Init function %.200s", file);
diff --git a/ext/extmk.rb.in b/ext/extmk.rb.in
index 14374c2249..a2ff7c63ab 100644
--- a/ext/extmk.rb.in
+++ b/ext/extmk.rb.in
@@ -356,8 +356,13 @@ $(TARGET): $(OBJS)
mfile.close
if PLATFORM =~ /beos/
+ if PLATFORM =~ /^powerpc/ then
+ deffilename = "ruby.exp"
+ else
+ deffilename = "ruby.def"
+ end
print "creating ruby.def\n"
- open("ruby.def", "w") do |file|
+ open(deffilename, "w") do |file|
file.print("EXPORTS\n") if PLATFORM =~ /^i/
file.print("Init_#{target}\n")
end
diff --git a/file.c b/file.c
index 4ef8d3258c..449d888814 100644
--- a/file.c
+++ b/file.c
@@ -97,10 +97,10 @@ file_s_open(argc, argv, klass)
file = file_open(RSTRING(fname)->ptr, mode);
RBASIC(file)->klass = klass;
+ obj_call_init(file);
if (iterator_p()) {
- rb_ensure(rb_yield, file, io_close, file);
+ return rb_ensure(rb_yield, file, io_close, file);
}
- obj_call_init(file);
return file;
}
diff --git a/parse.y b/parse.y
index 172d9c3c85..0fcd9919ae 100644
--- a/parse.y
+++ b/parse.y
@@ -57,7 +57,7 @@ static enum lex_state {
EXPR_BEG, /* ignore newline, +/- is a sign. */
EXPR_MID, /* newline significant, +/- is a sign. */
EXPR_END, /* newline significant, +/- is a operator. */
- EXPR_ARG, /* newline significant, +/- may be a sign. */
+ EXPR_ARG, /* newline significant, +/- is a operator. */
EXPR_FNAME, /* ignore newline, +/- is a operator, no reserved words. */
EXPR_DOT, /* immediate after `.', no reserved words. */
EXPR_CLASS, /* immediate after `class', no here document. */
@@ -2498,15 +2498,7 @@ retry:
yylval.id = '+';
return tOP_ASGN;
}
- if (lex_state == EXPR_ARG) {
- if (space_seen && !ISSPACE(c)) {
- arg_ambiguous();
- }
- else {
- lex_state = EXPR_END;
- }
- }
- if (lex_state != EXPR_END) {
+ if (lex_state == EXPR_BEG || lex_state == EXPR_MID) {
if (ISDIGIT(c)) {
goto start_num;
}
@@ -2532,15 +2524,7 @@ retry:
yylval.id = '-';
return tOP_ASGN;
}
- if (lex_state == EXPR_ARG) {
- if (space_seen && !ISSPACE(c)) {
- arg_ambiguous();
- }
- else {
- lex_state = EXPR_END;
- }
- }
- if (lex_state != EXPR_END) {
+ if (lex_state == EXPR_BEG || lex_state == EXPR_MID) {
if (ISDIGIT(c)) {
pushback(c);
c = '-';
diff --git a/regex.c b/regex.c
index 5ccd9ff182..082ce4fd9d 100644
--- a/regex.c
+++ b/regex.c
@@ -866,6 +866,7 @@ calculate_must_string(start, end)
mcnt = *p;
if (mcnt > max) {
must = p;
+ max = mcnt;
}
p += mcnt+1;
break;
@@ -878,6 +879,8 @@ calculate_must_string(start, end)
case casefold_on:
case casefold_off:
+ return 0; /* should not check must_string */
+
case start_paren:
case start_nowidth:
case stop_nowidth:
@@ -2225,13 +2228,17 @@ re_compile_fastmap(bufp)
{
case exactn:
if (p[1] == 0xff) {
- if (TRANSLATE_P())
- fastmap[translate[p[2]]] = 2;
- else
- fastmap[p[2]] = 2;
+ if (TRANSLATE_P()) {
+ fastmap[translate[p[2]]] = 2;
+ bufp->options |= RE_MAY_IGNORECASE;
+ }
+ else
+ fastmap[p[2]] = 2;
}
- else if (TRANSLATE_P())
+ else if (TRANSLATE_P()) {
fastmap[translate[p[1]]] = 1;
+ bufp->options |= RE_MAY_IGNORECASE;
+ }
else
fastmap[p[1]] = 1;
break;
@@ -2245,13 +2252,18 @@ re_compile_fastmap(bufp)
case wordend:
case pop_and_fail:
case start_paren:
+ continue;
+
case casefold_on:
case casefold_off:
+ options ^= RE_OPTION_IGNORECASE;
continue;
case endline:
- if (TRANSLATE_P())
+ if (TRANSLATE_P()) {
fastmap[translate['\n']] = 1;
+ bufp->options |= RE_MAY_IGNORECASE;
+ }
else
fastmap['\n'] = 1;
@@ -2374,8 +2386,10 @@ re_compile_fastmap(bufp)
for (j = *p++ * BYTEWIDTH - 1; j >= 0; j--)
if (p[j / BYTEWIDTH] & (1 << (j % BYTEWIDTH)))
{
- if (TRANSLATE_P())
+ if (TRANSLATE_P()) {
fastmap[translate[j]] = 1;
+ bufp->options |= RE_MAY_IGNORECASE;
+ }
else
fastmap[j] = 1;
}
@@ -2526,15 +2540,16 @@ re_search(bufp, string, size, startpos, range, regs)
break;
}
}
-#if 1
+
if (range > 0
&& bufp->must
&& !must_instr(bufp->must+1, bufp->must[0],
string+startpos, size-startpos,
- (TRANSLATE_P())?translate:0)) {
+ (bufp->options&(RE_OPTION_IGNORECASE|RE_MAY_IGNORECASE))?
+ translate:0)) {
return -1;
}
-#endif
+
/* Update the fastmap now if not correct already. */
if (fastmap && !bufp->fastmap_accurate) {
re_compile_fastmap(bufp);
@@ -2569,7 +2584,8 @@ re_search(bufp, string, size, startpos, range, regs)
break;
}
else
- if (fastmap[(TRANSLATE_P()) ? translate[c] : c])
+ if (fastmap[(bufp->options&(RE_OPTION_IGNORECASE|RE_MAY_IGNORECASE))?
+ translate[c] : c])
break;
range--;
}
@@ -2581,7 +2597,8 @@ re_search(bufp, string, size, startpos, range, regs)
c = string[startpos];
c &= 0xff;
- if ((TRANSLATE_P()) ? !fastmap[translate[c]] : !fastmap[c])
+ if ((bufp->options&(RE_OPTION_IGNORECASE|RE_MAY_IGNORECASE)) ?
+ !fastmap[translate[c]] : !fastmap[c])
goto advance;
}
}
diff --git a/regex.h b/regex.h
index 0dd6b5627b..5854c3cab6 100644
--- a/regex.h
+++ b/regex.h
@@ -164,8 +164,9 @@ extern long re_syntax_options;
| RE_NO_BK_REFS | RE_NO_EMPTY_RANGES \
| RE_NO_HYPHEN_RANGE_END)
-#define RE_OPTION_IGNORECASE (1L<<0)
-#define RE_OPTION_EXTENDED (1L<<1)
+#define RE_OPTION_EXTENDED (1L<<0)
+#define RE_OPTION_IGNORECASE (1L<<1)
+#define RE_MAY_IGNORECASE (1L<<2)
/* For multi-byte char support */
#define MBCTYPE_ASCII 0
diff --git a/version.h b/version.h
index c671a12e83..154eb0b31a 100644
--- a/version.h
+++ b/version.h
@@ -1,2 +1,2 @@
-#define RUBY_VERSION "1.1b9_22"
-#define VERSION_DATE "98/05/19"
+#define RUBY_VERSION "1.1b9_23"
+#define VERSION_DATE "98/05/26"