* common.mk: generate ext_prelude.c by prelude.rb and gem_prelude.rb.
ruby (not miniruby) is linked with ext_prelude.o instead of prelude.o.
* inits.c (rb_call_inits): don't call Init_prelude.
* ruby.c: support --disable-gems option.
(ruby_init_gems): new function to define Gem::Enable and
invoke Init_prelude.
(process_options): call ruby_init_gems just after
ruby_init_loadpath.
* tool/compile_prelude.rb: support multiple files.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@13865 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
use instruby.rb to install extensions instead of ext/extmk.rb.
* instruby.rb: store installed list into the file.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@10943 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* mkconfig.rb, ext/extmk.rb, lib/mkmf.rb, win32/mkexports.rb: suppress
warnings with $VERBOSE.
* win32/resource.rb: only file which has more than one icon is DLL.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@10891 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* main.c (always_gc): dllimport is required for VC to import a DLL
symbol. fixed: [ruby-dev:28051]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@9714 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
macro definitions.
* bcc32/Makefile.sub: LIBRUBY_SO should use DLDOBJS, not EXTOBJS.
* {win32,wince}/Makefile.sub: separate config.h for compiler versions.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@8902 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* array.c (rb_ary_update): a[n,m]=nil no longer works as element
deletion.
* enum.c (enum_sort_by): protect continuation jump in.
[ruby-dev:24642]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@7145 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
doesn't work for object files on VC.
* */Makefile.sub (config.h): need SIZEOF_TIME_T now.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@6113 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
separate files under directories due to directory separator.
* */Makefile.sub (MKFILES): common.mk and */Makefile.sub should not be
removed.
* win32/Makefile.sub, wince/Makefile.sub: $* cannot appear in explicit
rules.
* cygwin/GNUmakefile.in: some mingw stuffs were missed.
* lib/mkmf.rb (create_makefile): Borland make wrongly removes braces
from command lines.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@6001 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
runruby.rb: run rdoc, test and so on with compiled extension
libraries. [ruby-dev:22688]
* ext/extmk.rb, lib/mkmf.rb: make extension libraries in separated
directory, similar to the actual directory structure.
* lib/fileutils.rb (FileUtils.copy_file): use the mode of the original
file to create new file.
* lib/rdoc/ri/ri_paths.rb (RI::Paths::SYSDIR): get rid of unexpected
influence by envirionment variable.
* bcc32/configure.bat, win32/configure.bat: add install-doc options.
* win32/win32.c, win32/win32.h (rb_w32_fstat): fix Borland C runtime
bug which returns wrong mode. [ruby-dev:22846]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@5659 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
rdoc documentation, you need to run configure with
--enable-install-doc.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@5419 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
String#[] if more than one arguments are specified.
* lib/delegate.rb: avoid using common instance name as "@obj".
* lib/cgi.rb (CGI::QueryExtension::Value): Value is no longer
subclass of String, but DelegateClass(String).
* ext/curses/extconf.rb: restore function check for init_color.
[ruby-list:38905]
* Makefile.in: need to specify $(MAINLIBS) for the miniruby
generation rule.
* configure.in: better FreeBSD -lc_r support.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@5206 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
pthread is used.
* marshal.c (w_extended): singleton methods should not be checked
when dumping via marshal_dump() or _dump(). [ruby-talk:85909]
* file.c (getcwdofdrv): avoid using getcwd() directly, use
my_getcwd() instead.
* merged NeXT, OpenStep, Rhapsody ports patch from Eric Sunshine
<sunshine@sunshineco.com>. [ruby-core:01596]
* marshal.c (w_object): LINK check earlier than anything else,
i.e. do not dump TYPE_IVAR for already dumped objects.
(ruby-bugs PR#1220)
* eval.c (rb_eval): call "inherited" only when a new class is
generated; not on reopening.
* eval.c (eval): prepend error position in evaluating string to
* configure.in: revived NextStep, OpenStep, and Rhapsody ports which
had become unbuildable; enhanced --enable-fat-binary option so that
it accepts a list of desired architectures (rather than assuming a
fixed list), or defaults to a platform-appropriate list if user does
not provide an explicit list; made the default list of architectures
for MAB (fat binary) more comprehensive; now uses -fno-common even
when building the interpreter (in addition to using it for
extensions), thus allowing the interpreter to be embedded into a
plugin module of an external project (in addition to allowing
embedding directly into an application); added checks for
<netinet/in_systm.h> (needed by `socket' extension) and getcwd(); now
ensures that -I/usr/local/include is employed when extensions'
extconf.rb scripts invoke have_header() since extension checks on
NextStep and OpenStep will fail without it if the desired resource
resides in the /usr/local tree; fixed formatting of --help message.
* Makefile.in: $(LIBRUBY_A) rule now deletes the archive before
invoking $(AR) since `ar' on Apple/NeXT can not "update" MAB archives
(see configure's --enable-fat-binary option); added rule for new
missing/getcwd.c.
* defines.h: fixed endian handling during MAB build (see configure's
--enable-fat-binary option) to ensure that all portions of the
project see the correct WORDS_BIGENDIAN value (some extension modules
were getting the wrong endian setting); added missing constants
GETPGRP_VOID, WNOHANG, WUNTRACED, X_OK, and type pid_t for NextStep
and OpenStep; removed unnecessary and problematic HAVE_SYS_WAIT_H
define in NeXT section.
* dir.c: do not allow NAMLEN() macro to trust dirent::d_namlen on
NextStep since, on some installations, this value always resolves
uselessly to zero.
* dln.c: added error reporting to NextStep extension loader since the
previous behavior of failing silently was not useful; now ensures
that NSLINKMODULE_OPTION_BINDNOW compatibility constant is defined
for OpenStep and Rhapsody; no longer includes <mach-o/dyld.h> twice
on Rhapsody since this header lacks multiple-include protection,
which resulted in "redefinition" compilation errors.
* main.c: also create hard reference to objc_msgSend() on NeXT
platforms (in addition to Apple platforms).
* lib/mkmf.rb: now exports XCFLAGS from configure script to extension
makefiles so that extensions can be built MAB (see configure's
--enable-fat-binary option); also utilize XCFLAGS in cc_command()
(but not cpp_command() because MAB flags are incompatible with
direct invocation of `cpp').
* ext/curses/extconf.rb: now additionally checks for presence of these
curses functions which are not present on NextStep or Openstep:
bkgd(), bkgdset(), color(), curs(), getbkgd(), init(), scrl(), set(),
setscrreg(), wattroff(), wattron(), wattrset(), wbkgd(), wbkgdset(),
wscrl(), wsetscrreg()
* ext/curses/curses.c: added appropriate #ifdef's for additional set of
curses functions now checked by extconf.rb; fixed curses_bkgd() and
window_bkgd() to correctly return boolean result rather than numeric
result; fixed window_getbkgd() to correctly signal an error by
returning nil rather than -1.
* ext/etc/etc.c: setup_passwd() and setup_group() now check for null
pointers before invoking rb_tainted_str_new2() upon fields extracted
from `struct passwd' and `struct group' since null pointers in some
fields are common on NextStep/OpenStep (especially so for the
`pw_comment' field) and rb_tainted_str_new2() throws an exception
when it receives a null pointer.
* ext/pty/pty.c: include "util.h" for strdup()/ruby_strdup() for
platforms such as NextStep and OpenStep which lack strdup().
* ext/socket/getaddrinfo.c: cast first argument of getservbyname(),
gethostbyaddr(), and gethostbyname() from (const char*) to non-const
(char*) for older platforms such as NextStep and OpenStep.
* ext/socket/socket.c: include "util.h" for strdup()/ruby_strdup() for
platforms such as NextStep and OpenStep which lack strdup(); include
<netinet/in_systm.h> if present for NextStep and OpenStep; cast first
argument of gethostbyaddr() and getservbyname() from (const char*) to
non-const (char*) for older platforms.
* ext/syslog/syslog.c: include "util.h" for strdup()/ruby_strdup() for
platforms such as NextStep and OpenStep which lack strdup().
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@5002 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
setgrent, getgrent, endgrent.
* ext/socket/socket.c (sock_s_gethostbyname): do not reverse lookup.
* Makefile.in: copy lex.c from $(srcdir) if it's not the current
directory. [ruby-dev:21437]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@4640 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* Makefile.in (fake.rb): set ALT_SEPARATOR to the default value.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@3568 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
bcc32/Makefile.sub: Replace the complicated MFLAGS/MAKEFLAGS
parser with something plain and comprehensible. This fixes a
bug where make flags were wrongly reordered and the resulted
command line often did not make sense especially when BSD make
is used with extra arguments given. Tested with FreeBSD and
Linux by me and mswin32, bccwin32 and mingw by usa.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@3408 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
mdoc. Provide a new option --with-mantype={doc|man} in case the
check does not work as expected.
* Makefile.in (MANTYPE): Define MANTYPE and pass it to
instruby.rb.
* instruby.rb: Convert mdoc manpages to man for systems which
nroff(1) does not grok mdoc.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@3377 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* configure.in (LIBRUBYARG_STATIC, LIBRUBYARG_SHARED): linker
argument to link static/shared library respectively.
* Makefile.in (LIBRUBYARG_STATIC, LIBRUBYARG_SHARED): added.
* bcc32/Makefile.sub, win32/Makefile.sub: ditto.
* instruby.rb (LIBRUBY_A): install to libdir.
* lib/mkmf.rb (link_command): link static library of ruby, or
try_run fails unless LIBRUBY_SO is installed. [ruby-dev:18646]
* eval.c (call_trace_func): toplevel caller was missing.
[ruby-dev:18754]
* eval.c (proc_to_s): adjust created line number.
* parse.y (primary, do_block, brace_block): adjust line number of
block to beginning line, instead of the first statement inside
the block.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@3042 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
win32/Makefile.sub: Introduce better command line syntax
(--make/--make-flags/--extstatic) to extmk.rb and instruby.rb.
Previously such command as 'make -j3 install' with pmake doesn't
fail. Formerly extmk.rb was receiving "make -j 3 -j 3" via the
command line arguments and just ended up recognizing the first
"3" as destdir. [with help of usa]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@3022 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* configure.in (LIBEXT): suffix for static libraries.
* configure.in (LIBPATHFLAG): switch template to specify library
path.
* configure.in (LINK_SO): command to link shared objects.
* configure.in (DEFFILE, ARCHFILE): miscellaneous system dependent
files.
* configure.in (EXPORT_PREFIX): prefix to exported symbols on
Windows.
* configure.in (COMMON_LIBS, COMMON_MACROS, COMMON_HEADERS):
libraries, macros and headers used in common.
* configure.in (RUBYW_INSTALL_NAME, rubyw_install_name): GUI mode
excutable name.
* Makefile.in (CFLAGS): append XCFLAGS.
* Makefile.in (PREP): miscellaneous system dependent files.
* Makefile.in (ruby.imp, ext/extinit.o): moved from ext/extmk.rb.
* Makefile.in (fake.rb): CROSS_COMPILING keeps building platform.
* Makefile.in (MAKEFILES): depend on *.in and config.status.
* Makefile.in (parse.c): replace "y.tab.c" with actual name for
byacc.
* ext/extmk.rb, lib/mkmf.rb: integrated.
* ext/extmk.rb: propagate MFLAGS.
* ext/extmk.rb (extmake): make dummy Makefile to clean even if no
Makefile is made.
* lib/mkmf.rb (older): accept multiple file names and Time
objects.
* lib/mkmf.rb (xsystem): split and qoute.
* lib/mkmf.rb (cpp_include): make include directives.
* lib/mkmf.rb (try_func): try wheather specified function is
available.
* lib/mkmf.rb (install_files): default to site-install.
* lib/mkmf.rb (checking_for): added.
* lib/mkmf.rb (find_executable0): just find executable file with
no message.
* lib/mkmf.rb (create_header): output header file is variable.
* lib/mkmf.rb (create_makefile): separate sections.
* lib/mkmf.rb (init_mkmf): initialize global variables.
* win32/Makefile.sub, bcc32/Makefile.sub (CPP, AR): added.
* bcc32/Makefile.sub (ARCH): fixed to i386.
* win32/Makefile.sub, bcc32/Makefile.sub (miniruby): should not
link EXTOBJS.
* ext/dl/extconf.rb: use try_cpp to cross compile.
* ext/dl/extconf.rb: not modify files in source directory.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@2977 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* eval.c (set_method_visibility): should have clear cache forq
updated visibility.
* numeric.c (flo_to_s): default format precision to be "%.16g".
* util.c (ruby_strtod): use own strtod(3) implementation to avoid
locale hell. Due to this change "0xff".to_f no longer returns 255.0
* eval.c (avalue_to_yvalue): new function to distinguish yvalue
(no-arg == Qundef) from svalue (no-arg == Qnil).
* eval.c (rb_yield_0): use avalue_to_yvalue().
* eval.c (assign): warn if val == Qundef where it means rhs is
void (e.g. yield without value or call without argument).
* parse.y (value_expr): need not to warn for WHILE and UNTIL,
since they can have return value (via valued break).
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@2457 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
also be detected.
* eval.c (rb_eval_cmd): cbase should not be NULL; it should be
either ruby_wrapper or Object.
* enum.c (enum_each_with_index): should return self.
* process.c (proc_setpgrp): should return value for non-void function.
* process.c (proc_getpgid): should raise exception if getpgid() return -1.
* string.c (rb_str_ljust): should return a duplicated string.
* string.c (rb_str_rjust): ditto.
* string.c (rb_str_center): ditto.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@2172 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
lastline and lastmatch in the thread struct for later restore.
* eval.c (rb_thread_save_context): restore lastline and lastmatch.
* numeric.c (flo_to_s): should handle negative float value.
* class.c (rb_include_module): should check whole ancestors to
avoid duplicate module inclusion.
* string.c (trnext): should check backslash before updating "now"
position.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@1746 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* configure.in: get --enable-shared to work on MacOS X.
* Makefile.in: make $(LIBRUBY_SO) depend on miniruby properly.
Now `make -jN' should work without a problem.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@1360 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* configure.in: Link libc_r against the ruby executable on
FreeBSD, which is the first attempt to work around a certain
problem regarding pthread on FreeBSD. It should make ruby/libruby
happy when it loads an extention to a library compiled and linked
with -pthread. Note, however, that libruby is _not_ linked with
libc_r so as not to mess up pthread unfriendly stuff including
apache+mod_ruby and vim6+ruby_interp.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@1297 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* gc.c (rb_gc_call_finalizer_at_exit): clear klass member of
terminating object.
* eval.c (rb_call): raise exception for terminated object.
* bignum.c (bigdivrem): t2 might be too big for signed long; do
not use rb_int2big(), but rb_uint2big().
* error.c (rb_load_fail): new func to report LoadError.
* ruby.c (load_file): use rb_load_fail.
* eval.c (ruby_finalize): should enclosed by PUSH_TAG/POP_TAG.
* gc.c (rb_gc_mark): link 2 of NODE_IFUNC should not be explicitly
marked. it may contain non object pointer.
* re.c (reg_s_last_match): Regexp::last_match(nth) returns nth
substring of the match (alternative for $& and $<digit>).
* eval.c (rb_mod_define_method): wrong comparison for blocks.
* gc.c (id2ref): should handle Symbol too.
* gc.c (id2ref): should print original ptr value
* eval.c (rb_iterate): NODE_CFUNC does not protect its data
(nd_tval), so create new node NODE_IFUNC for iteration C
function.
* eval.c (rb_yield_0): use NODE_IFUNC.
* gc.c (rb_gc_mark): support NODE_IFUNC.
* gc.c (mem_error): prohibit recursive mem_error().
(ruby-bugs-ja:PR#36)
* eval.c (rb_thread_fd_writable): should not switch context if
rb_thread_critical is set.
* eval.c (rb_thread_wait_fd): ditto.
* eval.c (rb_thread_wait_for): ditto.
* eval.c (rb_thread_select): ditto.
* eval.c (rb_thread_join): join during critical section causes
deadlock.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@1090 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
which included commits to RCS files with non-trunk default branches.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@373 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
which included commits to RCS files with non-trunk default branches.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@12 b2dd03c8-39d4-4d8f-98ff-823fe69b080e