Skip to content

Commit e630077

Browse files
author
matz
committed
1.1b9_23
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/v1_1r@226 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
1 parent 0f34277 commit e630077

File tree

10 files changed

+66
-44
lines changed

10 files changed

+66
-44
lines changed

ChangeLog

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,10 @@
1+
Tue May 26 11:39:50 1998 Yukihiro Matsumoto <matz@netlab.co.jp>
2+
3+
* experimental release 1.1b9_23.
4+
5+
* parse.y (yylex): no UPLUS/UMINUS for 1st argument if
6+
parenthesises are omitted.
7+
18
Tue May 26 01:09:55 1998 Yukihiro Matsumoto <matz@netlab.co.jp>
29

310
* regex.c (re_compile_pattern): (?XI) for turns off the

configure

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3482,10 +3482,10 @@ echo "configure:3434: checking whether OS depend dynamic link works" >&5
34823482
beos*) LDSHARED="ld -xms"
34833483
case "$host_cpu" in
34843484
powerpc*)
3485-
DLDFLAGS="-f ruby.def -lbe -lroot -ldll"
3485+
DLDFLAGS="-f ruby.exp -lbe -lroot glue-noinit.a init_term_dyn.o start_dyn.o"
34863486
;;
34873487
*)
3488-
DLDFLAGS="ruby.def -lbe -lroot /boot/develop/lib/x86/glue-noinit.a"
3488+
DLDFLAGS="ruby.def -lbe -lroot glue-noinit.a init_term_dyn.o start_dyn.o"
34893489
;;
34903490
esac
34913491
rb_cv_dlopen=yes ;;
@@ -3862,7 +3862,7 @@ if test "$host_os" = "beos"; then
38623862
echo creating ruby.def
38633863
case "$host_cpu" in
38643864
powerpc*)
3865-
cp beos/ruby.def.in ruby.def
3865+
cp beos/ruby.def.in ruby.exp
38663866
;;
38673867
*)
38683868
echo EXPORTS > ruby.def

configure.in

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -360,10 +360,10 @@ if test "$with_dln_a_out" != yes; then
360360
beos*) LDSHARED="ld -xms"
361361
case "$host_cpu" in
362362
powerpc*)
363-
DLDFLAGS="-f ruby.def -lbe -lroot -ldll"
363+
DLDFLAGS="-f ruby.exp -lbe -lroot glue-noinit.a init_term_dyn.o start_dyn.o"
364364
;;
365365
*)
366-
DLDFLAGS="ruby.def -lbe -lroot /boot/develop/lib/x86/glue-noinit.a"
366+
DLDFLAGS="ruby.def -lbe -lroot glue-noinit.a init_term_dyn.o start_dyn.o"
367367
;;
368368
esac
369369
rb_cv_dlopen=yes ;;
@@ -513,7 +513,7 @@ if test "$host_os" = "beos"; then
513513
echo creating ruby.def
514514
case "$host_cpu" in
515515
powerpc*)
516-
cp beos/ruby.def.in ruby.def
516+
cp beos/ruby.def.in ruby.exp
517517
;;
518518
*)
519519
echo EXPORTS > ruby.def

dln.c

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1365,6 +1365,14 @@ dln_load(file)
13651365
err_stat = get_image_symbol(img_id, buf,
13661366
B_SYMBOL_TYPE_TEXT, &init_fct);
13671367

1368+
if (err_stat != B_NO_ERROR) {
1369+
char real_name[1024];
1370+
strcpy(real_name, buf);
1371+
strcat(real_name, "__Fv");
1372+
err_stat = get_image_symbol(img_id, real_name,
1373+
B_SYMBOL_TYPE_TEXT, &init_fct);
1374+
}
1375+
13681376
if ((B_BAD_IMAGE_ID == err_stat) || (B_BAD_INDEX == err_stat)) {
13691377
unload_add_on(img_id);
13701378
LoadError("Failed to lookup Init function %.200s", file);

ext/extmk.rb.in

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -356,8 +356,13 @@ $(TARGET): $(OBJS)
356356
mfile.close
357357

358358
if PLATFORM =~ /beos/
359+
if PLATFORM =~ /^powerpc/ then
360+
deffilename = "ruby.exp"
361+
else
362+
deffilename = "ruby.def"
363+
end
359364
print "creating ruby.def\n"
360-
open("ruby.def", "w") do |file|
365+
open(deffilename, "w") do |file|
361366
file.print("EXPORTS\n") if PLATFORM =~ /^i/
362367
file.print("Init_#{target}\n")
363368
end

file.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -97,10 +97,10 @@ file_s_open(argc, argv, klass)
9797
file = file_open(RSTRING(fname)->ptr, mode);
9898

9999
RBASIC(file)->klass = klass;
100+
obj_call_init(file);
100101
if (iterator_p()) {
101-
rb_ensure(rb_yield, file, io_close, file);
102+
return rb_ensure(rb_yield, file, io_close, file);
102103
}
103-
obj_call_init(file);
104104

105105
return file;
106106
}

parse.y

Lines changed: 3 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,7 @@ static enum lex_state {
5757
EXPR_BEG, /* ignore newline, +/- is a sign. */
5858
EXPR_MID, /* newline significant, +/- is a sign. */
5959
EXPR_END, /* newline significant, +/- is a operator. */
60-
EXPR_ARG, /* newline significant, +/- may be a sign. */
60+
EXPR_ARG, /* newline significant, +/- is a operator. */
6161
EXPR_FNAME, /* ignore newline, +/- is a operator, no reserved words. */
6262
EXPR_DOT, /* immediate after `.', no reserved words. */
6363
EXPR_CLASS, /* immediate after `class', no here document. */
@@ -2498,15 +2498,7 @@ retry:
24982498
yylval.id = '+';
24992499
return tOP_ASGN;
25002500
}
2501-
if (lex_state == EXPR_ARG) {
2502-
if (space_seen && !ISSPACE(c)) {
2503-
arg_ambiguous();
2504-
}
2505-
else {
2506-
lex_state = EXPR_END;
2507-
}
2508-
}
2509-
if (lex_state != EXPR_END) {
2501+
if (lex_state == EXPR_BEG || lex_state == EXPR_MID) {
25102502
if (ISDIGIT(c)) {
25112503
goto start_num;
25122504
}
@@ -2532,15 +2524,7 @@ retry:
25322524
yylval.id = '-';
25332525
return tOP_ASGN;
25342526
}
2535-
if (lex_state == EXPR_ARG) {
2536-
if (space_seen && !ISSPACE(c)) {
2537-
arg_ambiguous();
2538-
}
2539-
else {
2540-
lex_state = EXPR_END;
2541-
}
2542-
}
2543-
if (lex_state != EXPR_END) {
2527+
if (lex_state == EXPR_BEG || lex_state == EXPR_MID) {
25442528
if (ISDIGIT(c)) {
25452529
pushback(c);
25462530
c = '-';

regex.c

Lines changed: 29 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -866,6 +866,7 @@ calculate_must_string(start, end)
866866
mcnt = *p;
867867
if (mcnt > max) {
868868
must = p;
869+
max = mcnt;
869870
}
870871
p += mcnt+1;
871872
break;
@@ -878,6 +879,8 @@ calculate_must_string(start, end)
878879

879880
case casefold_on:
880881
case casefold_off:
882+
return 0; /* should not check must_string */
883+
881884
case start_paren:
882885
case start_nowidth:
883886
case stop_nowidth:
@@ -2225,13 +2228,17 @@ re_compile_fastmap(bufp)
22252228
{
22262229
case exactn:
22272230
if (p[1] == 0xff) {
2228-
if (TRANSLATE_P())
2229-
fastmap[translate[p[2]]] = 2;
2230-
else
2231-
fastmap[p[2]] = 2;
2231+
if (TRANSLATE_P()) {
2232+
fastmap[translate[p[2]]] = 2;
2233+
bufp->options |= RE_MAY_IGNORECASE;
2234+
}
2235+
else
2236+
fastmap[p[2]] = 2;
22322237
}
2233-
else if (TRANSLATE_P())
2238+
else if (TRANSLATE_P()) {
22342239
fastmap[translate[p[1]]] = 1;
2240+
bufp->options |= RE_MAY_IGNORECASE;
2241+
}
22352242
else
22362243
fastmap[p[1]] = 1;
22372244
break;
@@ -2245,13 +2252,18 @@ re_compile_fastmap(bufp)
22452252
case wordend:
22462253
case pop_and_fail:
22472254
case start_paren:
2255+
continue;
2256+
22482257
case casefold_on:
22492258
case casefold_off:
2259+
options ^= RE_OPTION_IGNORECASE;
22502260
continue;
22512261

22522262
case endline:
2253-
if (TRANSLATE_P())
2263+
if (TRANSLATE_P()) {
22542264
fastmap[translate['\n']] = 1;
2265+
bufp->options |= RE_MAY_IGNORECASE;
2266+
}
22552267
else
22562268
fastmap['\n'] = 1;
22572269

@@ -2374,8 +2386,10 @@ re_compile_fastmap(bufp)
23742386
for (j = *p++ * BYTEWIDTH - 1; j >= 0; j--)
23752387
if (p[j / BYTEWIDTH] & (1 << (j % BYTEWIDTH)))
23762388
{
2377-
if (TRANSLATE_P())
2389+
if (TRANSLATE_P()) {
23782390
fastmap[translate[j]] = 1;
2391+
bufp->options |= RE_MAY_IGNORECASE;
2392+
}
23792393
else
23802394
fastmap[j] = 1;
23812395
}
@@ -2526,15 +2540,16 @@ re_search(bufp, string, size, startpos, range, regs)
25262540
break;
25272541
}
25282542
}
2529-
#if 1
2543+
25302544
if (range > 0
25312545
&& bufp->must
25322546
&& !must_instr(bufp->must+1, bufp->must[0],
25332547
string+startpos, size-startpos,
2534-
(TRANSLATE_P())?translate:0)) {
2548+
(bufp->options&(RE_OPTION_IGNORECASE|RE_MAY_IGNORECASE))?
2549+
translate:0)) {
25352550
return -1;
25362551
}
2537-
#endif
2552+
25382553
/* Update the fastmap now if not correct already. */
25392554
if (fastmap && !bufp->fastmap_accurate) {
25402555
re_compile_fastmap(bufp);
@@ -2569,7 +2584,8 @@ re_search(bufp, string, size, startpos, range, regs)
25692584
break;
25702585
}
25712586
else
2572-
if (fastmap[(TRANSLATE_P()) ? translate[c] : c])
2587+
if (fastmap[(bufp->options&(RE_OPTION_IGNORECASE|RE_MAY_IGNORECASE))?
2588+
translate[c] : c])
25732589
break;
25742590
range--;
25752591
}
@@ -2581,7 +2597,8 @@ re_search(bufp, string, size, startpos, range, regs)
25812597

25822598
c = string[startpos];
25832599
c &= 0xff;
2584-
if ((TRANSLATE_P()) ? !fastmap[translate[c]] : !fastmap[c])
2600+
if ((bufp->options&(RE_OPTION_IGNORECASE|RE_MAY_IGNORECASE)) ?
2601+
!fastmap[translate[c]] : !fastmap[c])
25852602
goto advance;
25862603
}
25872604
}

regex.h

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -164,8 +164,9 @@ extern long re_syntax_options;
164164
| RE_NO_BK_REFS | RE_NO_EMPTY_RANGES \
165165
| RE_NO_HYPHEN_RANGE_END)
166166

167-
#define RE_OPTION_IGNORECASE (1L<<0)
168-
#define RE_OPTION_EXTENDED (1L<<1)
167+
#define RE_OPTION_EXTENDED (1L<<0)
168+
#define RE_OPTION_IGNORECASE (1L<<1)
169+
#define RE_MAY_IGNORECASE (1L<<2)
169170

170171
/* For multi-byte char support */
171172
#define MBCTYPE_ASCII 0

version.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
1-
#define RUBY_VERSION "1.1b9_22"
2-
#define VERSION_DATE "98/05/19"
1+
#define RUBY_VERSION "1.1b9_23"
2+
#define VERSION_DATE "98/05/26"

0 commit comments

Comments
 (0)