summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authormatz <matz@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>1998-07-24 04:42:07 +0000
committermatz <matz@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>1998-07-24 04:42:07 +0000
commit3b0fec9a5f966fd7ae26bc7b84877fa7209d8605 (patch)
tree48fbc4b02d73ca0f173ed87e288ee406e0913b97
parent0d30af8fd2bcfea8cf5dbf87b623c57960ce81bc (diff)
1.1c1
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/v1_1r@278 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
-rw-r--r--ChangeLog12
-rw-r--r--config.sub3
-rw-r--r--error.c6
-rw-r--r--eval.c14
-rw-r--r--ext/tcltklib/extconf.rb4
-rw-r--r--gc.c2
-rw-r--r--io.c1
-rw-r--r--lib/matrix.rb1
-rw-r--r--lib/tk.rb19
-rw-r--r--lib/tracer.rb1
-rw-r--r--regex.c12
-rw-r--r--ruby.c2
-rw-r--r--version.h4
13 files changed, 48 insertions, 33 deletions
diff --git a/ChangeLog b/ChangeLog
index b1719e24324..7529e26ca84 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,7 @@
+Fri Jul 24 13:40:19 1998 Yukihiro Matsumoto <matz@netlab.co.jp>
+
+ * version 1.1c1 released.
+
Fri Jul 24 02:10:22 1998 Yukihiro Matsumoto <matz@netlab.co.jp>
* marshal.c (r_bytes2): allocated buffer size was too short.
@@ -8,6 +12,14 @@ Fri Jul 24 02:10:22 1998 Yukihiro Matsumoto <matz@netlab.co.jp>
* re.c (reg_get_kcode): code number was wrong.
+Thu Jul 23 13:11:32 1998 Yukihiro Matsumoto <matz@netlab.co.jp>
+
+ * eval.c (rb_attr): argument should be symbol or a string.
+
+Wed Jul 22 11:59:34 1998 Yukihiro Matsumoto <matz@netlab.co.jp>
+
+ * regex.c (calculate_must_string): wrong offset added.
+
Wed Jul 22 11:59:59 1998 Yukihiro Matsumoto <matz@netlab.co.jp>
* st.c (rehash): still had a GC problem. fixed.
diff --git a/config.sub b/config.sub
index 438abc81529..9775812226e 100644
--- a/config.sub
+++ b/config.sub
@@ -781,6 +781,9 @@ case $os in
-xenix)
os=-xenix
;;
+ -uxpds)
+ os=-uxpds
+ ;;
-human)
;;
-beos)
diff --git a/error.c b/error.c
index c316e88d9c8..a0346a4c6be 100644
--- a/error.c
+++ b/error.c
@@ -393,12 +393,12 @@ exception(argc, argv)
}
for (i=0; i<argc; i++) { /* argument check */
id = rb_to_id(argv[i]);
- if (!rb_is_const_id(id)) {
- ArgError("identifier `%s' needs to be constant", rb_id2name(id));
- }
if (!rb_id2name(id)) {
ArgError("argument needs to be symbol or string");
}
+ if (!rb_is_const_id(id)) {
+ ArgError("identifier `%s' needs to be constant", rb_id2name(id));
+ }
}
for (i=0; i<argc; i++) {
v = rb_define_class_under(the_class,
diff --git a/eval.c b/eval.c
index c17c91bfa29..776cb98f0c4 100644
--- a/eval.c
+++ b/eval.c
@@ -326,7 +326,7 @@ rb_attr(klass, id, read, write, ex)
{
char *name;
char *buf;
- ID attr, attreq, attriv;
+ ID attr, attriv;
int noex;
if (!ex) noex = NOEX_PUBLIC;
@@ -344,17 +344,19 @@ rb_attr(klass, id, read, write, ex)
}
name = rb_id2name(id);
- attr = rb_intern(name);
+ if (!name) {
+ ArgError("argument needs to be symbol or string");
+ }
buf = ALLOCA_N(char,strlen(name)+2);
- sprintf(buf, "%s=", name);
- attreq = rb_intern(buf);
sprintf(buf, "@%s", name);
attriv = rb_intern(buf);
if (read) {
- rb_add_method(klass, attr, NEW_IVAR(attriv), noex);
+ rb_add_method(klass, id, NEW_IVAR(attriv), noex);
}
+ sprintf(buf, "%s=", name);
+ id = rb_intern(buf);
if (write) {
- rb_add_method(klass, attreq, NEW_ATTRSET(attriv), noex);
+ rb_add_method(klass, id, NEW_ATTRSET(attriv), noex);
}
}
diff --git a/ext/tcltklib/extconf.rb b/ext/tcltklib/extconf.rb
index 31c858c203e..282e53d09a6 100644
--- a/ext/tcltklib/extconf.rb
+++ b/ext/tcltklib/extconf.rb
@@ -75,9 +75,9 @@ end
if have_header("tcl.h") && have_header("tk.h") &&
search_lib("libX11.{a,so}", "XOpenDisplay",
"/usr/lib", "/usr/openwin/lib", "/usr/X11*/lib") &&
- search_lib("libtcl{,7*,8*}.{a,so}", "Tcl_FindExecutable",
+ search_lib("libtcl{,8*,7*}.{a,so}", "Tcl_FindExecutable",
"/usr/lib", "/usr/local/lib") &&
- search_lib("libtk{,4*,8*}.{a,so}", "Tk_Init",
+ search_lib("libtk{,8*,4*}.{a,so}", "Tk_Init",
"/usr/lib", "/usr/local/lib")
$LDFLAGS = $libraries.collect{|path| "-L" + path}.join(" ")
create_makefile("tcltklib")
diff --git a/gc.c b/gc.c
index 2d6e5aeee66..62ce13b785c 100644
--- a/gc.c
+++ b/gc.c
@@ -686,7 +686,7 @@ obj_free(obj)
break;
case T_DATA:
if (DATA_PTR(obj)) {
- if (RANY(obj)->as.data.dfree == (void*)-1) {
+ if ((long)RANY(obj)->as.data.dfree == -1) {
free(DATA_PTR(obj));
}
if (RANY(obj)->as.data.dfree) {
diff --git a/io.c b/io.c
index a2be5a70ff3..9d5bbc56563 100644
--- a/io.c
+++ b/io.c
@@ -1327,7 +1327,6 @@ io_mode_string(fptr)
case FMODE_READWRITE:
return "r+";
}
- return "r";
}
VALUE
diff --git a/lib/matrix.rb b/lib/matrix.rb
index 3924e93ecb6..14b4d4779f7 100644
--- a/lib/matrix.rb
+++ b/lib/matrix.rb
@@ -1,4 +1,3 @@
-#!/usr/local/bin/ruby
#
# matrix.rb -
# $Release Version: 1.0$
diff --git a/lib/tk.rb b/lib/tk.rb
index 7c04798222a..0bc3107c44a 100644
--- a/lib/tk.rb
+++ b/lib/tk.rb
@@ -453,9 +453,9 @@ module TkCore
end
def rb_appsend(interp, async, *args)
- args.unshift('ruby {')
- args.push('}')
- appsend(interp, async, *args)
+ args = args.filter{|c| _get_eval_string(c).gsub(/[][$"]/, '\\\\\&')}
+ args.push(').to_s"')
+ appsend(interp, async, 'ruby "(', *args)
end
def appsend_displayof(interp, win, async, *args)
@@ -468,9 +468,9 @@ module TkCore
end
def rb_appsend_displayof(interp, win, async, *args)
- args.unshift('ruby {')
- args.push('}')
- appsend_displayof(interp, win, async, *args)
+ args = args.filter{|c| _get_eval_string(c).gsub(/[][$"]/, '\\\\\&')}
+ args.push(').to_s"')
+ appsend_displayof(interp, win, async, 'ruby "(', *args)
end
def info(*args)
@@ -713,13 +713,14 @@ class TkVariable
def value
begin
- tk_tcl2ruby(INTERP._eval(format('global %s; set %s', @id, @id)))
+ INTERP._eval(format('global %s; set %s', @id, @id))
rescue
if INTERP._eval(format('global %s; array exists %s', @id, @id)) != "1"
raise
else
- Hash[*tk_tcl2ruby(INTERP._eval(format('global %s; array get %s',
- @id, @id)))]
+ Hash[*tk_split_simplelist(INTERP\
+ ._eval(format('global %s; array get %s',
+ @id, @id)))]
end
end
end
diff --git a/lib/tracer.rb b/lib/tracer.rb
index b7ef5362695..fbfca24fe5f 100644
--- a/lib/tracer.rb
+++ b/lib/tracer.rb
@@ -1,4 +1,3 @@
-#!/usr/local/bin/ruby
#
# tracer.rb -
# $Release Version: 0.2$
diff --git a/regex.c b/regex.c
index 77d6fd09e09..6bac7a25fb4 100644
--- a/regex.c
+++ b/regex.c
@@ -193,7 +193,7 @@ void
re_set_casetable(table)
char *table;
{
- translate = table;
+ translate = (unsigned char*)table;
}
/* Jim Meyering writes:
@@ -705,12 +705,12 @@ print_partial_compiled_pattern(start, end)
printf ("/charset%s",
(enum regexpcode) *(p - 1) == charset_not ? "_not" : "");
- mcnt = *p;
+ mcnt = *p++;
printf("/%d", mcnt);
for (c = 0; c < mcnt; c++)
{
unsigned bit;
- unsigned char map_byte = p[1 + c];
+ unsigned char map_byte = p[c];
putchar ('/');
@@ -718,7 +718,7 @@ print_partial_compiled_pattern(start, end)
if (map_byte & (1 << bit))
printf("%c", c * BYTEWIDTH + bit);
}
- p += mcnt + 1;
+ p += mcnt;
mcnt = EXTRACT_UNSIGNED_AND_INCR(p);
while (mcnt--) {
int beg, end;
@@ -848,7 +848,7 @@ static void
print_compiled_pattern(bufp)
struct re_pattern_buffer *bufp;
{
- unsigned char *buffer = bufp->buffer;
+ unsigned char *buffer = (unsigned char*)bufp->buffer;
print_partial_compiled_pattern (buffer, buffer + bufp->used);
}
@@ -914,7 +914,7 @@ calculate_must_string(start, end)
case charset:
case charset_not:
mcnt = *p++;
- p += mcnt+1;
+ p += mcnt;
mcnt = EXTRACT_UNSIGNED_AND_INCR(p);
while (mcnt--) {
EXTRACT_MBC_AND_INCR(p);
diff --git a/ruby.c b/ruby.c
index eb7563009f8..d39830dabf4 100644
--- a/ruby.c
+++ b/ruby.c
@@ -580,7 +580,7 @@ load_file(fname, script)
if (script) {
rb_define_global_const("DATA", f);
}
- if (f != rb_stdin) {
+ else if (f != rb_stdin) {
io_close(f);
}
}
diff --git a/version.h b/version.h
index 2b437af4e9d..c3daac061ab 100644
--- a/version.h
+++ b/version.h
@@ -1,2 +1,2 @@
-#define RUBY_VERSION "1.1c0"
-#define VERSION_DATE "98/07/17"
+#define RUBY_VERSION "1.1c1"
+#define VERSION_DATE "98/07/24"