mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
baseline
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/v1_1r@243 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
parent
83687c4eb4
commit
16487ee284
28 changed files with 381 additions and 258 deletions
16
ChangeLog
16
ChangeLog
|
|
@ -1,3 +1,19 @@
|
||||||
|
Tue Jun 16 12:30:46 1998 Yukihiro Matsumoto <matz@netlab.co.jp>
|
||||||
|
|
||||||
|
* bignum.c (str2inum): handles `+ddd'.
|
||||||
|
|
||||||
|
* struct.c (make_struct): name parameter can be nil for unnamed
|
||||||
|
structures.
|
||||||
|
|
||||||
|
pMon Jun 15 16:30:10 1998 Yukihiro Matsumoto <matz@netlab.co.jp>
|
||||||
|
|
||||||
|
* object.c (class_s_inherited): prohibiting to make subclass of
|
||||||
|
class Class.
|
||||||
|
|
||||||
|
* object.c (module_s_new): support for making subclass of Module.
|
||||||
|
|
||||||
|
* parse.y (yycompile): clear eval_tree before compiling.
|
||||||
|
|
||||||
Fri Jun 12 17:58:18 1998 Yukihiro Matsumoto <matz@netlab.co.jp>
|
Fri Jun 12 17:58:18 1998 Yukihiro Matsumoto <matz@netlab.co.jp>
|
||||||
|
|
||||||
* eval.c (eval): write back the_dyna_var into the block.
|
* eval.c (eval): write back the_dyna_var into the block.
|
||||||
|
|
|
||||||
4
MANIFEST
4
MANIFEST
|
|
@ -37,7 +37,6 @@ install-sh
|
||||||
instruby.rb
|
instruby.rb
|
||||||
intern.h
|
intern.h
|
||||||
io.c
|
io.c
|
||||||
io.h
|
|
||||||
keywords
|
keywords
|
||||||
lex.c
|
lex.c
|
||||||
main.c
|
main.c
|
||||||
|
|
@ -59,8 +58,9 @@ regex.h
|
||||||
ruby.1
|
ruby.1
|
||||||
ruby.c
|
ruby.c
|
||||||
ruby.h
|
ruby.h
|
||||||
|
rubyio.h
|
||||||
|
rubysig.h
|
||||||
rubytest.rb
|
rubytest.rb
|
||||||
sig.h
|
|
||||||
signal.c
|
signal.c
|
||||||
sprintf.c
|
sprintf.c
|
||||||
st.c
|
st.c
|
||||||
|
|
|
||||||
6
bignum.c
6
bignum.c
|
|
@ -175,7 +175,11 @@ str2inum(str, base)
|
||||||
USHORT *zds;
|
USHORT *zds;
|
||||||
|
|
||||||
while (ISSPACE(*str)) str++;
|
while (ISSPACE(*str)) str++;
|
||||||
if (*str == '-') {
|
|
||||||
|
if (*str == '|') {
|
||||||
|
str++;
|
||||||
|
}
|
||||||
|
else if (*str == '-') {
|
||||||
str++;
|
str++;
|
||||||
sign = 0;
|
sign = 0;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
4
config.guess
vendored
4
config.guess
vendored
|
|
@ -783,7 +783,11 @@ main ()
|
||||||
#endif
|
#endif
|
||||||
int version;
|
int version;
|
||||||
version=`(hostinfo | sed -n 's/.*NeXT Mach \([0-9]*\).*/\1/p') 2>/dev/null`;
|
version=`(hostinfo | sed -n 's/.*NeXT Mach \([0-9]*\).*/\1/p') 2>/dev/null`;
|
||||||
|
if (version < 4)
|
||||||
printf ("%s-next-nextstep%d\n", __ARCHITECTURE__, version);
|
printf ("%s-next-nextstep%d\n", __ARCHITECTURE__, version);
|
||||||
|
else
|
||||||
|
printf ("%s-next-openstep%d\n", __ARCHITECTURE__, version);
|
||||||
|
|
||||||
exit (0);
|
exit (0);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|
|
||||||
2
config.sub
vendored
2
config.sub
vendored
|
|
@ -723,7 +723,7 @@ case $os in
|
||||||
| -ptx* | -coff* | -ecoff* | -winnt* | -domain* | -vsta* \
|
| -ptx* | -coff* | -ecoff* | -winnt* | -domain* | -vsta* \
|
||||||
| -udi* | -eabi* | -lites* | -ieee* | -go32* | -aux* \
|
| -udi* | -eabi* | -lites* | -ieee* | -go32* | -aux* \
|
||||||
| -cygwin32* | -pe* | -psos* | -moss* | -proelf* \
|
| -cygwin32* | -pe* | -psos* | -moss* | -proelf* \
|
||||||
| -linux* | -bow*)
|
| -linux* | -bow* | -rhapsody* | -openstep* )
|
||||||
# Remember, each alternative MUST END IN *, to match a version number.
|
# Remember, each alternative MUST END IN *, to match a version number.
|
||||||
;;
|
;;
|
||||||
-sunos5*)
|
-sunos5*)
|
||||||
|
|
|
||||||
36
configure.in
36
configure.in
|
|
@ -33,12 +33,19 @@ AC_CANONICAL_HOST
|
||||||
dnl checks for fat-binary
|
dnl checks for fat-binary
|
||||||
fat_binary=no
|
fat_binary=no
|
||||||
AC_ARG_ENABLE( fat-binary,
|
AC_ARG_ENABLE( fat-binary,
|
||||||
[--enable-fat-binary build a NeXT Multi Architecture Binary. ],
|
[--enable-fat-binary build a NeXT/Apple Multi Architecture Binary. ],
|
||||||
[ fat_binary=$enableval ] )
|
[ fat_binary=$enableval ] )
|
||||||
if test "$fat_binary" = yes ; then
|
if test "$fat_binary" = yes ; then
|
||||||
|
|
||||||
AC_MSG_CHECKING( target architecture )
|
AC_MSG_CHECKING( target architecture )
|
||||||
|
|
||||||
|
if test "$host_os" = "rhapsody" ; then
|
||||||
|
echo -n "Rhapsody: "
|
||||||
|
if test "$TARGET_ARCHS" = "" ; then
|
||||||
|
TARGET_ARCHS="ppc i486"
|
||||||
|
fi
|
||||||
|
else
|
||||||
|
echo -n "NeXTSTEP/OPENSTEP: "
|
||||||
if test "$TARGET_ARCHS" = "" ; then
|
if test "$TARGET_ARCHS" = "" ; then
|
||||||
if test `/usr/bin/arch` = "m68k" ; then
|
if test `/usr/bin/arch` = "m68k" ; then
|
||||||
TARGET_ARCHS="m68k i486"
|
TARGET_ARCHS="m68k i486"
|
||||||
|
|
@ -46,6 +53,7 @@ if test "$fat_binary" = yes ; then
|
||||||
TARGET_ARCHS="m68k `/usr/bin/arch`"
|
TARGET_ARCHS="m68k `/usr/bin/arch`"
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
|
fi
|
||||||
# /usr/lib/arch_tool -archify_list $TARGET_ARCHS
|
# /usr/lib/arch_tool -archify_list $TARGET_ARCHS
|
||||||
for archs in $TARGET_ARCHS
|
for archs in $TARGET_ARCHS
|
||||||
do
|
do
|
||||||
|
|
@ -118,6 +126,8 @@ fi
|
||||||
dnl Checks for libraries.
|
dnl Checks for libraries.
|
||||||
case "$host_os" in
|
case "$host_os" in
|
||||||
nextstep*) ;;
|
nextstep*) ;;
|
||||||
|
openstep*) ;;
|
||||||
|
rhapsody*) ;;
|
||||||
human*) ;;
|
human*) ;;
|
||||||
beos*) ;;
|
beos*) ;;
|
||||||
*) LIBS="-lm $LIBS";;
|
*) LIBS="-lm $LIBS";;
|
||||||
|
|
@ -312,6 +322,8 @@ if test "$with_dln_a_out" != yes; then
|
||||||
if test "$GCC" = yes; then
|
if test "$GCC" = yes; then
|
||||||
case "$host_os" in
|
case "$host_os" in
|
||||||
nextstep*) ;;
|
nextstep*) ;;
|
||||||
|
openstep*) ;;
|
||||||
|
rhapsody*) ;;
|
||||||
human*) ;;
|
human*) ;;
|
||||||
*) CCDLFLAGS=-fpic;;
|
*) CCDLFLAGS=-fpic;;
|
||||||
esac
|
esac
|
||||||
|
|
@ -352,6 +364,14 @@ if test "$with_dln_a_out" != yes; then
|
||||||
LDFLAGS="-u libsys_s"
|
LDFLAGS="-u libsys_s"
|
||||||
DLDFLAGS="$ARCH_FLAG"
|
DLDFLAGS="$ARCH_FLAG"
|
||||||
rb_cv_dlopen=yes ;;
|
rb_cv_dlopen=yes ;;
|
||||||
|
openstep*) LDSHARED='cc -dynamic -bundle -undefined suppress'
|
||||||
|
LDFLAGS=""
|
||||||
|
DLDFLAGS="$ARCH_FLAG"
|
||||||
|
rb_cv_dlopen=yes ;;
|
||||||
|
rhapsody*) LDSHARED='cc -dynamic -bundle -undefined suppress'
|
||||||
|
LDFLAGS=""
|
||||||
|
DLDFLAGS="$ARCH_FLAG"
|
||||||
|
rb_cv_dlopen=yes ;;
|
||||||
aix*) LDSHARED='../../miniruby ../aix_ld.rb $(TARGET)'
|
aix*) LDSHARED='../../miniruby ../aix_ld.rb $(TARGET)'
|
||||||
rb_cv_dlopen=yes ;;
|
rb_cv_dlopen=yes ;;
|
||||||
human*) DLDFLAGS=''
|
human*) DLDFLAGS=''
|
||||||
|
|
@ -408,6 +428,10 @@ else
|
||||||
AC_DEFINE(DLEXT, ".sl");;
|
AC_DEFINE(DLEXT, ".sl");;
|
||||||
nextstep*) DLEXT=o
|
nextstep*) DLEXT=o
|
||||||
AC_DEFINE(DLEXT, ".o");;
|
AC_DEFINE(DLEXT, ".o");;
|
||||||
|
openstep*) DLEXT=bundle
|
||||||
|
AC_DEFINE(DLEXT, ".bundle");;
|
||||||
|
rhapsody*) DLEXT=bundle
|
||||||
|
AC_DEFINE(DLEXT, ".bundle");;
|
||||||
*) DLEXT=so
|
*) DLEXT=so
|
||||||
AC_DEFINE(DLEXT, ".so");;
|
AC_DEFINE(DLEXT, ".so");;
|
||||||
esac
|
esac
|
||||||
|
|
@ -425,6 +449,10 @@ case "$host_os" in
|
||||||
STRIP='strip -S -x';;
|
STRIP='strip -S -x';;
|
||||||
nextstep*)
|
nextstep*)
|
||||||
STRIP='strip -A -n';;
|
STRIP='strip -A -n';;
|
||||||
|
openstep*)
|
||||||
|
STRIP='strip -A -n';;
|
||||||
|
rhapsody*)
|
||||||
|
STRIP='strip -A -n';;
|
||||||
esac
|
esac
|
||||||
|
|
||||||
EXTSTATIC=
|
EXTSTATIC=
|
||||||
|
|
@ -521,6 +549,12 @@ if test "$host_os" = "beos"; then
|
||||||
;;
|
;;
|
||||||
esac
|
esac
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
if test "$host_os" = "rhapsody" ; then
|
||||||
|
CFLAGS="$CFLAGS -no-precomp"
|
||||||
|
fi
|
||||||
|
|
||||||
|
|
||||||
AC_SUBST(LIBRUBY)
|
AC_SUBST(LIBRUBY)
|
||||||
AC_SUBST(LIBRUBYARG)
|
AC_SUBST(LIBRUBYARG)
|
||||||
AC_SUBST(SOLIBS)
|
AC_SUBST(SOLIBS)
|
||||||
|
|
|
||||||
|
|
@ -23,7 +23,9 @@
|
||||||
|
|
||||||
#ifdef NeXT
|
#ifdef NeXT
|
||||||
#define DYNAMIC_ENDIAN /* determine endian at runtime */
|
#define DYNAMIC_ENDIAN /* determine endian at runtime */
|
||||||
|
#ifndef __Apple__
|
||||||
#define S_IXUSR _S_IXUSR /* execute/search permission, owner */
|
#define S_IXUSR _S_IXUSR /* execute/search permission, owner */
|
||||||
|
#endif
|
||||||
#define S_IXGRP 0000010 /* execute/search permission, group */
|
#define S_IXGRP 0000010 /* execute/search permission, group */
|
||||||
#define S_IXOTH 0000001 /* execute/search permission, other */
|
#define S_IXOTH 0000001 /* execute/search permission, other */
|
||||||
#endif /* NeXT */
|
#endif /* NeXT */
|
||||||
|
|
|
||||||
19
eval.c
19
eval.c
|
|
@ -13,7 +13,7 @@
|
||||||
#include "ruby.h"
|
#include "ruby.h"
|
||||||
#include "node.h"
|
#include "node.h"
|
||||||
#include "env.h"
|
#include "env.h"
|
||||||
#include "sig.h"
|
#include "rubysig.h"
|
||||||
|
|
||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
#include <setjmp.h>
|
#include <setjmp.h>
|
||||||
|
|
@ -360,7 +360,7 @@ rb_attr(klass, id, read, write, ex)
|
||||||
|
|
||||||
static ID init, eqq, each, aref, aset, match;
|
static ID init, eqq, each, aref, aset, match;
|
||||||
VALUE errinfo = Qnil;
|
VALUE errinfo = Qnil;
|
||||||
extern NODE *eval_tree0;
|
extern NODE *eval_tree_begin;
|
||||||
extern NODE *eval_tree;
|
extern NODE *eval_tree;
|
||||||
extern int nerrs;
|
extern int nerrs;
|
||||||
|
|
||||||
|
|
@ -883,7 +883,6 @@ ruby_options(argc, argv)
|
||||||
ruby_process_options(argc, argv);
|
ruby_process_options(argc, argv);
|
||||||
ext_init = 1; /* Init_ext() called in ruby_process_options */
|
ext_init = 1; /* Init_ext() called in ruby_process_options */
|
||||||
save = eval_tree;
|
save = eval_tree;
|
||||||
eval_tree = 0;
|
|
||||||
ruby_require_modules();
|
ruby_require_modules();
|
||||||
eval_tree = save;
|
eval_tree = save;
|
||||||
}
|
}
|
||||||
|
|
@ -901,9 +900,9 @@ eval_node(self)
|
||||||
VALUE result = Qnil;
|
VALUE result = Qnil;
|
||||||
NODE *tree;
|
NODE *tree;
|
||||||
|
|
||||||
if (eval_tree0) {
|
if (eval_tree_begin) {
|
||||||
tree = eval_tree0;
|
tree = eval_tree_begin;
|
||||||
eval_tree0 = 0;
|
eval_tree_begin = 0;
|
||||||
rb_eval(self, tree);
|
rb_eval(self, tree);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -2251,8 +2250,8 @@ rb_eval(self, node)
|
||||||
else {
|
else {
|
||||||
if (nd_type(list->nd_head) == NODE_EVSTR) {
|
if (nd_type(list->nd_head) == NODE_EVSTR) {
|
||||||
rb_in_eval++;
|
rb_in_eval++;
|
||||||
eval_tree = 0;
|
|
||||||
list->nd_head = compile(list->nd_head->nd_lit,0);
|
list->nd_head = compile(list->nd_head->nd_lit,0);
|
||||||
|
eval_tree = 0;
|
||||||
rb_in_eval--;
|
rb_in_eval--;
|
||||||
if (nerrs > 0) {
|
if (nerrs > 0) {
|
||||||
compile_error("string expansion");
|
compile_error("string expansion");
|
||||||
|
|
@ -3818,7 +3817,6 @@ eval(self, src, scope, file, line)
|
||||||
}
|
}
|
||||||
PUSH_TAG(PROT_NONE);
|
PUSH_TAG(PROT_NONE);
|
||||||
if ((state = EXEC_TAG()) == 0) {
|
if ((state = EXEC_TAG()) == 0) {
|
||||||
eval_tree = 0;
|
|
||||||
sourcefile = file;
|
sourcefile = file;
|
||||||
sourceline = line;
|
sourceline = line;
|
||||||
compile(src, file);
|
compile(src, file);
|
||||||
|
|
@ -4640,7 +4638,8 @@ Init_eval()
|
||||||
match = rb_intern("=~");
|
match = rb_intern("=~");
|
||||||
|
|
||||||
rb_global_variable((VALUE*)&top_scope);
|
rb_global_variable((VALUE*)&top_scope);
|
||||||
rb_global_variable((VALUE*)&eval_tree0);
|
rb_global_variable((VALUE*)&eval_tree_begin);
|
||||||
|
|
||||||
rb_global_variable((VALUE*)&eval_tree);
|
rb_global_variable((VALUE*)&eval_tree);
|
||||||
rb_global_variable((VALUE*)&the_dyna_vars);
|
rb_global_variable((VALUE*)&the_dyna_vars);
|
||||||
|
|
||||||
|
|
@ -6173,7 +6172,7 @@ thread_create(fn, arg)
|
||||||
posix_signal(SIGALRM, catch_timer);
|
posix_signal(SIGALRM, catch_timer);
|
||||||
#else
|
#else
|
||||||
signal(SIGVTALRM, catch_timer);
|
signal(SIGVTALRM, catch_timer);
|
||||||
posix_signal(SIGALRM, catch_timer);
|
signal(SIGALRM, catch_timer);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
tval.it_interval.tv_sec = 0;
|
tval.it_interval.tv_sec = 0;
|
||||||
|
|
|
||||||
|
|
@ -331,6 +331,16 @@ $(TARGET): $(OBJS)
|
||||||
mfile.printf "\
|
mfile.printf "\
|
||||||
$(TARGET): $(OBJS)
|
$(TARGET): $(OBJS)
|
||||||
cc -r $(CFLAGS) -o $(TARGET) $(OBJS)
|
cc -r $(CFLAGS) -o $(TARGET) $(OBJS)
|
||||||
|
"
|
||||||
|
elsif PLATFORM =~ "-openstep"
|
||||||
|
mfile.printf "\
|
||||||
|
$(TARGET): $(OBJS)
|
||||||
|
cc -r $(CFLAGS) -o $(TARGET) $(OBJS)
|
||||||
|
"
|
||||||
|
elsif PLATFORM =~ "-rhapsody"
|
||||||
|
mfile.printf "\
|
||||||
|
$(TARGET): $(OBJS)
|
||||||
|
cc -r $(CFLAGS) -o $(TARGET) $(OBJS)
|
||||||
"
|
"
|
||||||
elsif $static
|
elsif $static
|
||||||
mfile.printf "\
|
mfile.printf "\
|
||||||
|
|
@ -379,7 +389,7 @@ def extmake(target)
|
||||||
return if $nodynamic and not $static
|
return if $nodynamic and not $static
|
||||||
|
|
||||||
$objs = nil
|
$objs = nil
|
||||||
$libs = PLATFORM =~ /cygwin32|beos/ ? nil : "-lc"
|
$libs = PLATFORM =~ /cygwin32|beos|openstep|nextstep|rhapsody/ ? nil : "-lc"
|
||||||
$local_libs = nil # to be assigned in extconf.rb
|
$local_libs = nil # to be assigned in extconf.rb
|
||||||
$CFLAGS = nil
|
$CFLAGS = nil
|
||||||
$LDFLAGS = nil
|
$LDFLAGS = nil
|
||||||
|
|
|
||||||
|
|
@ -9,7 +9,7 @@
|
||||||
************************************************/
|
************************************************/
|
||||||
|
|
||||||
#include "ruby.h"
|
#include "ruby.h"
|
||||||
#include "io.h"
|
#include "rubyio.h"
|
||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
#include <sys/types.h>
|
#include <sys/types.h>
|
||||||
#ifndef NT
|
#ifndef NT
|
||||||
|
|
|
||||||
|
|
@ -5,7 +5,7 @@
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include "ruby.h"
|
#include "ruby.h"
|
||||||
#include "sig.h"
|
#include "rubysig.h"
|
||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
#include <string.h>
|
#include <string.h>
|
||||||
#include <tcl.h>
|
#include <tcl.h>
|
||||||
|
|
|
||||||
2
file.c
2
file.c
|
|
@ -11,7 +11,7 @@
|
||||||
************************************************/
|
************************************************/
|
||||||
|
|
||||||
#include "ruby.h"
|
#include "ruby.h"
|
||||||
#include "io.h"
|
#include "rubyio.h"
|
||||||
|
|
||||||
#ifdef HAVE_UNISTD_H
|
#ifdef HAVE_UNISTD_H
|
||||||
#include <unistd.h>
|
#include <unistd.h>
|
||||||
|
|
|
||||||
2
gc.c
2
gc.c
|
|
@ -11,7 +11,7 @@
|
||||||
************************************************/
|
************************************************/
|
||||||
|
|
||||||
#include "ruby.h"
|
#include "ruby.h"
|
||||||
#include "sig.h"
|
#include "rubysig.h"
|
||||||
#include "st.h"
|
#include "st.h"
|
||||||
#include "node.h"
|
#include "node.h"
|
||||||
#include "env.h"
|
#include "env.h"
|
||||||
|
|
|
||||||
2
hash.c
2
hash.c
|
|
@ -12,7 +12,7 @@
|
||||||
|
|
||||||
#include "ruby.h"
|
#include "ruby.h"
|
||||||
#include "st.h"
|
#include "st.h"
|
||||||
#include "sig.h"
|
#include "rubysig.h"
|
||||||
|
|
||||||
#include <sys/types.h>
|
#include <sys/types.h>
|
||||||
#include <sys/stat.h>
|
#include <sys/stat.h>
|
||||||
|
|
|
||||||
6
io.c
6
io.c
|
|
@ -11,7 +11,7 @@
|
||||||
************************************************/
|
************************************************/
|
||||||
|
|
||||||
#include "ruby.h"
|
#include "ruby.h"
|
||||||
#include "io.h"
|
#include "rubyio.h"
|
||||||
#include <ctype.h>
|
#include <ctype.h>
|
||||||
#include <errno.h>
|
#include <errno.h>
|
||||||
|
|
||||||
|
|
@ -39,10 +39,6 @@ struct timeval {
|
||||||
|
|
||||||
#include <sys/stat.h>
|
#include <sys/stat.h>
|
||||||
|
|
||||||
#if defined(DJGPP) || defined(__CYGWIN32__) || defined(NT) || defined(__human68k__)
|
|
||||||
#include <fcntl.h>
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#ifdef HAVE_SYS_PARAM_H
|
#ifdef HAVE_SYS_PARAM_H
|
||||||
# include <sys/param.h>
|
# include <sys/param.h>
|
||||||
#else
|
#else
|
||||||
|
|
|
||||||
|
|
@ -60,7 +60,11 @@ class CGI < SimpleDelegator
|
||||||
read_from_cmdline
|
read_from_cmdline
|
||||||
end.split(/&/).each do |x|
|
end.split(/&/).each do |x|
|
||||||
key, val = x.split(/=/,2).collect{|x|unescape(x)}
|
key, val = x.split(/=/,2).collect{|x|unescape(x)}
|
||||||
@inputs[key] += ("\0" if @inputs[key]) + (val or "")
|
if @inputs.include?('key')
|
||||||
|
@inputs[key] += "\0" + (val or "")
|
||||||
|
else
|
||||||
|
@inputs[key] = (val or "")
|
||||||
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
super(@inputs)
|
super(@inputs)
|
||||||
|
|
|
||||||
10
lib/tk.rb
10
lib/tk.rb
|
|
@ -812,11 +812,11 @@ module TkGrid
|
||||||
end
|
end
|
||||||
|
|
||||||
def columnconfigure(master, index, *args)
|
def columnconfigure(master, index, *args)
|
||||||
tk_call "grid", 'columnconfigure', master, index, *hash_kv(keys)
|
tk_call "grid", 'columnconfigure', master, index, *hash_kv(args)
|
||||||
end
|
end
|
||||||
|
|
||||||
def rowconfigure(master, index, *args)
|
def rowconfigure(master, index, *args)
|
||||||
tk_call "grid", 'rowconfigure', master, index, *hash_kv(keys)
|
tk_call "grid", 'rowconfigure', master, index, *hash_kv(args)
|
||||||
end
|
end
|
||||||
|
|
||||||
def add(widget, *args)
|
def add(widget, *args)
|
||||||
|
|
@ -1301,10 +1301,10 @@ class TkMenu<TkWindow
|
||||||
def index(index)
|
def index(index)
|
||||||
tk_send 'index', index
|
tk_send 'index', index
|
||||||
end
|
end
|
||||||
def invoke
|
def invoke(index)
|
||||||
tk_send 'invoke'
|
tk_send 'invoke', index
|
||||||
end
|
end
|
||||||
def insert(index, type, *keys)
|
def insert(index, type, keys=nil)
|
||||||
tk_send 'add', index, type, *hash_kv(keys)
|
tk_send 'add', index, type, *hash_kv(keys)
|
||||||
end
|
end
|
||||||
def post(x, y)
|
def post(x, y)
|
||||||
|
|
|
||||||
|
|
@ -10,7 +10,7 @@
|
||||||
************************************************/
|
************************************************/
|
||||||
|
|
||||||
#include "ruby.h"
|
#include "ruby.h"
|
||||||
#include "io.h"
|
#include "rubyio.h"
|
||||||
#include "st.h"
|
#include "st.h"
|
||||||
|
|
||||||
#define MARSHAL_MAJOR 4
|
#define MARSHAL_MAJOR 4
|
||||||
|
|
|
||||||
10
object.c
10
object.c
|
|
@ -529,10 +529,11 @@ mod_cmp(mod, arg)
|
||||||
}
|
}
|
||||||
|
|
||||||
VALUE
|
VALUE
|
||||||
module_s_new()
|
module_s_new(klass)
|
||||||
{
|
{
|
||||||
VALUE mod = module_new();
|
VALUE mod = module_new();
|
||||||
|
|
||||||
|
RBASIC(mod)->klass = klass;
|
||||||
obj_call_init(mod);
|
obj_call_init(mod);
|
||||||
return mod;
|
return mod;
|
||||||
}
|
}
|
||||||
|
|
@ -561,6 +562,12 @@ class_s_new(argc, argv)
|
||||||
return klass;
|
return klass;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
static VALUE
|
||||||
|
class_s_inherited()
|
||||||
|
{
|
||||||
|
TypeError("can't make subclass of Class");
|
||||||
|
}
|
||||||
|
|
||||||
VALUE mod_name();
|
VALUE mod_name();
|
||||||
VALUE mod_included_modules();
|
VALUE mod_included_modules();
|
||||||
VALUE mod_ancestors();
|
VALUE mod_ancestors();
|
||||||
|
|
@ -1039,6 +1046,7 @@ Init_Object()
|
||||||
rb_define_singleton_method(cClass, "new", class_s_new, -1);
|
rb_define_singleton_method(cClass, "new", class_s_new, -1);
|
||||||
rb_undef_method(cClass, "extend_object");
|
rb_undef_method(cClass, "extend_object");
|
||||||
rb_undef_method(cClass, "append_features");
|
rb_undef_method(cClass, "append_features");
|
||||||
|
rb_define_singleton_method(cClass, "inherited", class_s_inherited, 1);
|
||||||
|
|
||||||
cData = rb_define_class("Data", cObject);
|
cData = rb_define_class("Data", cObject);
|
||||||
rb_undef_method(CLASS_OF(cData), "new");
|
rb_undef_method(CLASS_OF(cData), "new");
|
||||||
|
|
|
||||||
6
parse.y
6
parse.y
|
|
@ -44,7 +44,7 @@ struct op_tbl {
|
||||||
char *name;
|
char *name;
|
||||||
};
|
};
|
||||||
|
|
||||||
NODE *eval_tree0 = 0;
|
NODE *eval_tree_begin = 0;
|
||||||
NODE *eval_tree = 0;
|
NODE *eval_tree = 0;
|
||||||
|
|
||||||
char *sourcefile; /* current source file */
|
char *sourcefile; /* current source file */
|
||||||
|
|
@ -354,7 +354,8 @@ stmt : iterator iter_do_block
|
||||||
}
|
}
|
||||||
'{' compstmt '}'
|
'{' compstmt '}'
|
||||||
{
|
{
|
||||||
eval_tree0 = block_append(eval_tree0,NEW_PREEXE($4));
|
eval_tree_begin = block_append(eval_tree_begin,
|
||||||
|
NEW_PREEXE($4));
|
||||||
local_pop();
|
local_pop();
|
||||||
$$ = 0;
|
$$ = 0;
|
||||||
}
|
}
|
||||||
|
|
@ -1596,6 +1597,7 @@ yycompile(f)
|
||||||
{
|
{
|
||||||
int n;
|
int n;
|
||||||
|
|
||||||
|
eval_tree = 0;
|
||||||
newline_seen = 0;
|
newline_seen = 0;
|
||||||
sourcefile = strdup(f);
|
sourcefile = strdup(f);
|
||||||
rb_in_compile = 1;
|
rb_in_compile = 1;
|
||||||
|
|
|
||||||
|
|
@ -11,7 +11,7 @@
|
||||||
************************************************/
|
************************************************/
|
||||||
|
|
||||||
#include "ruby.h"
|
#include "ruby.h"
|
||||||
#include "sig.h"
|
#include "rubysig.h"
|
||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
#include <errno.h>
|
#include <errno.h>
|
||||||
#include <signal.h>
|
#include <signal.h>
|
||||||
|
|
|
||||||
|
|
@ -1,6 +1,6 @@
|
||||||
/************************************************
|
/************************************************
|
||||||
|
|
||||||
io.h -
|
rubyio.h -
|
||||||
|
|
||||||
$Author$
|
$Author$
|
||||||
$Revision$
|
$Revision$
|
||||||
|
|
@ -14,7 +14,7 @@
|
||||||
#ifndef IO_H
|
#ifndef IO_H
|
||||||
#define IO_H
|
#define IO_H
|
||||||
|
|
||||||
#include "sig.h"
|
#include "rubysig.h"
|
||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
#include <errno.h>
|
#include <errno.h>
|
||||||
|
|
||||||
|
|
@ -1,6 +1,6 @@
|
||||||
/************************************************
|
/************************************************
|
||||||
|
|
||||||
sig.h -
|
rubysig.h -
|
||||||
|
|
||||||
$Author$
|
$Author$
|
||||||
$Date$
|
$Date$
|
||||||
2
signal.c
2
signal.c
|
|
@ -9,7 +9,7 @@
|
||||||
************************************************/
|
************************************************/
|
||||||
|
|
||||||
#include "ruby.h"
|
#include "ruby.h"
|
||||||
#include "sig.h"
|
#include "rubysig.h"
|
||||||
#include <signal.h>
|
#include <signal.h>
|
||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
|
|
||||||
|
|
|
||||||
15
struct.c
15
struct.c
|
|
@ -136,11 +136,17 @@ make_struct(name, member, klass)
|
||||||
ID id;
|
ID id;
|
||||||
int i;
|
int i;
|
||||||
|
|
||||||
id = rb_intern(RSTRING(name)->ptr);
|
if (NIL_P(name)) {
|
||||||
if (!rb_is_const_id(id)) {
|
nstr = class_new(klass);
|
||||||
NameError("identifier %s needs to be constant", RSTRING(name)->ptr);
|
}
|
||||||
|
else {
|
||||||
|
char *cname = STR2CSTR(name);
|
||||||
|
id = rb_intern(cname);
|
||||||
|
if (!rb_is_const_id(id)) {
|
||||||
|
NameError("identifier %s needs to be constant", cname);
|
||||||
|
}
|
||||||
|
nstr = rb_define_class_under(klass, cname, klass);
|
||||||
}
|
}
|
||||||
nstr = rb_define_class_under(klass, RSTRING(name)->ptr, klass);
|
|
||||||
rb_iv_set(nstr, "__size__", INT2FIX(RARRAY(member)->len));
|
rb_iv_set(nstr, "__size__", INT2FIX(RARRAY(member)->len));
|
||||||
rb_iv_set(nstr, "__member__", member);
|
rb_iv_set(nstr, "__member__", member);
|
||||||
|
|
||||||
|
|
@ -206,7 +212,6 @@ struct_s_def(argc, argv, klass)
|
||||||
VALUE st;
|
VALUE st;
|
||||||
|
|
||||||
rb_scan_args(argc, argv, "1*", &name, &rest);
|
rb_scan_args(argc, argv, "1*", &name, &rest);
|
||||||
Check_Type(name, T_STRING);
|
|
||||||
for (i=0; i<rest->len; i++) {
|
for (i=0; i<rest->len; i++) {
|
||||||
ID id = rb_to_id(rest->ptr[i]);
|
ID id = rb_to_id(rest->ptr[i]);
|
||||||
rest->ptr[i] = INT2FIX(id);
|
rest->ptr[i] = INT2FIX(id);
|
||||||
|
|
|
||||||
3
util.c
3
util.c
|
|
@ -93,6 +93,9 @@ int *retlen;
|
||||||
#ifdef HAVE_UNISTD_H
|
#ifdef HAVE_UNISTD_H
|
||||||
#include <unistd.h>
|
#include <unistd.h>
|
||||||
#endif
|
#endif
|
||||||
|
#if defined(HAVE_FCNTL)
|
||||||
|
#include <fcntl.h>
|
||||||
|
#endif
|
||||||
|
|
||||||
#ifndef S_ISDIR
|
#ifndef S_ISDIR
|
||||||
# define S_ISDIR(m) ((m & S_IFMT) == S_IFDIR)
|
# define S_ISDIR(m) ((m & S_IFMT) == S_IFDIR)
|
||||||
|
|
|
||||||
|
|
@ -211,8 +211,6 @@ rb_name_class(klass, id)
|
||||||
VALUE klass;
|
VALUE klass;
|
||||||
ID id;
|
ID id;
|
||||||
{
|
{
|
||||||
extern VALUE cString;
|
|
||||||
|
|
||||||
if (cString) {
|
if (cString) {
|
||||||
rb_iv_set(klass, "__classpath__", str_new2(rb_id2name(id)));
|
rb_iv_set(klass, "__classpath__", str_new2(rb_id2name(id)));
|
||||||
}
|
}
|
||||||
|
|
@ -619,7 +617,6 @@ rb_gvar_set(entry, val)
|
||||||
struct trace_data trace;
|
struct trace_data trace;
|
||||||
|
|
||||||
if (rb_safe_level() >= 4) {
|
if (rb_safe_level() >= 4) {
|
||||||
extern VALUE eSecurityError;
|
|
||||||
Raise(eSecurityError, "cannot change global variable value");
|
Raise(eSecurityError, "cannot change global variable value");
|
||||||
}
|
}
|
||||||
(*entry->setter)(val, entry->id, entry->data, entry);
|
(*entry->setter)(val, entry->id, entry->data, entry);
|
||||||
|
|
@ -725,7 +722,6 @@ rb_ivar_set(obj, id, val)
|
||||||
VALUE val;
|
VALUE val;
|
||||||
{
|
{
|
||||||
if (rb_safe_level() >= 5) {
|
if (rb_safe_level() >= 5) {
|
||||||
extern VALUE eSecurityError;
|
|
||||||
Raise(eSecurityError, "cannot change object status");
|
Raise(eSecurityError, "cannot change object status");
|
||||||
}
|
}
|
||||||
switch (TYPE(obj)) {
|
switch (TYPE(obj)) {
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue