Commit graph

185 commits

Author SHA1 Message Date
shyouhei
396a07307e merge revision(s) 31655:
* eval.c (rb_thread_atfork): When a ruby process forks, its random
	  seed shall be reinitialized to prevent CVE-2003-0900 situation.
	  This bug affects for 1.8 and earlier series, but not for 1.9.
	  fixed [ruby-core:34944].

	* io.c (pipe_open): ditto.

	* random.c (rb_reset_random_seed): ditto.

	* intern.h (rb_reset_random_seed): ditto.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_8@31655 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Signed-off-by: URABE, Shyouhei <shyouhei@ruby-lang.org>

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_8_7@31713 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2011-05-23 04:49:40 +00:00
shyouhei
98e7a2abca merge revision(s) 27721:27725,27738:27740:
* pack.c: backport integer pack/unpack from 1.9 for [ruby-core:21937].
	* configure.in: backport RUBY_DEFINT and fixed size integer checks.
	* ruby.h: include stdint.h if available.
	* bignum.c (rb_big_pack): defined..
	  (rb_big_unpack): defined.
	* intern.h (rb_big_pack): declared.
	  (rb_big_unpack): declared.
	* pack.c (pack_pack): call rb_quad_pack to preserve RangeError.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_8_7@28220 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2010-06-08 08:42:55 +00:00
shyouhei
8837f59485 merge revision(s) 19078,20097:
* gc.c (rb_mark_set): new function to mark keys.
	* marshal.c (struct dump_arg, struct load_arg): added wrappers to mark
	  data entries.  backport from trunk r13527,r13528,r13961,r16533.
	  [ruby-dev:36082]
	* marshal.c (marshal_load): arg.data is no longer a VALUE but a
	  st_table, and freed in load_ensure.  pointed out by pegacorn.
	  [ruby-dev:37008]


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_8_7@21731 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-01-22 06:22:00 +00:00
shyouhei
3c848f79b7 merge revision(s) 18463:
* gc.c (STACK_LEVEL_MAX, ruby_stack_length): returns size_t.
	  [ruby-core:18207]


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_8_7@21524 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-01-15 05:40:26 +00:00
shyouhei
719f4c42a9 merge revision(s) 17827,17846:17848:
* gc.c: add rb_during_gc(). based on a patch from arton <artonx AT
	  yahoo.co.jp> at [ruby-dev:35313].   
	* intern.h: ditto.
	* ext/win32ole/win32ole.c: avoid creating Ruby object during
	  GC. thanks to arton <artonx AT yahoo.co.jp>. [ruby-dev:35313]
	* ext/win32ole/tests: add test_win32ole_event.rb, remove
	  testOLEEVENT.rb
	* ext/win32ole/tests/testWIN32OLE.rb(test_convert_bignum):
	  fix test.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_8_7@17926 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-07-07 03:29:28 +00:00
shyouhei
594a34beda * array.c (ary_new, rb_ary_initialize, rb_ary_store,
rb_ary_aplice, rb_ary_times): integer overflows should be
  checked. based on patches from Drew Yao <ayao at apple.com>
  fixed CVE-2008-2726

* string.c (rb_str_buf_append): fixed unsafe use of alloca,
  which led memory corruption. based on a patch from Drew Yao
  <ayao at apple.com> fixed CVE-2008-2726

* sprintf.c (rb_str_format): backported from trunk.

* intern.h: ditto.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_8_7@17460 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-06-19 23:12:46 +00:00
knu
2b785b0f3e Merge changes from ruby_1_8 to reduce warnings and potentially improve
security.

* mkconfig.rb: hide build path from rbconfig.rb.

* util.c (ruby_strtod, dtoa): initialize more variables for error
  handling.

* io.c (rscheck), marshal.c (w_nbyte, w_bytes, w_unique),
  (path2class, path2module): constified.

* pack.c (pack_unpack), process.c (rb_syswait): suppress warnings.

* suppress warnings on cygwin, mingw and mswin.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_8_7@16863 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-06-06 10:39:57 +00:00
knu
f072d4e34a Merge from ruby_1_8.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_8_7@16719 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-05-31 11:44:49 +00:00
knu
32378c5abe Merge r16206 and r16239 from ruby_1_8.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_8_7@16457 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-05-18 14:48:15 +00:00
knu
a47dfe2763 Merge from ruby_1_8.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_8_7@16166 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-04-22 17:29:39 +00:00
knu
7f6df101ca Merge from ruby_1_8.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_8_7@16127 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-04-21 09:43:44 +00:00
knu
09f5560c57 Merge everything from ruby_1_8.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_8_7@16084 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-04-19 11:45:39 +00:00
knu
e926ef5233 * random.c (rb_genrand_int32, rb_genrand_real), intern.h: Export.
* string.c (rb_str_tmp_new), intern.h: New function.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_8@16014 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-04-14 10:52:17 +00:00
knu
fd8c8d09f4 * enumerator.c, inits.c (rb_call_inits), ruby.h, intern.h,
ext/enumerator, common.mk (OBJS, enumerator.$(OBJEXT)): Make the
  enumerator module built-in,

* enumerator.c: New method: Enumerable::Enumerator#with_index.

* enum.c (enum_each_with_index): Enumerable#each_with_index now
  returns an enumerator instead of raising an exception if no
  block is given.  Enumerable#enum_with_index, formerly defined in
  the enumerator module, is kept as an alias to each_with_index
  for backward compatibility.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_8@15934 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-04-09 11:13:04 +00:00
knu
e6de1a384e * eval.c (rb_obj_method, rb_proc_call), intern.h: Export.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_8@15932 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-04-09 10:47:13 +00:00
nobu
a6eded88af * object.c (rb_check_to_integer): backported for range_step.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_8@15905 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-04-05 01:05:03 +00:00
nobu
9e1da70e14 * intern.h, string.c (rb_str_set_len): added for upgrading path from
1.8 to 1.9. [ruby-dev:32807]


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_8@14727 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2007-12-27 02:01:24 +00:00
nobu
02da16b167 * eval.c, intern.h, ext/thread/thread.c: should not free queue while
any live threads are waiting.  [ruby-dev:30653]


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_8@13476 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2007-09-20 18:05:40 +00:00
nobu
0ee4c1a6e5 * intern.h (is_ruby_native_thread): removed since declared as an int
function in ruby.h already.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_8@12838 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2007-07-22 07:07:22 +00:00
nobu
60e3b1b441 * file.c (rb_file_s_rename): deleted code to get rid of a bug of
old Cygwin.

* file.c (rb_file_truncate): added prototype of GetLastError()
  on cygwin.  [ruby-dev:31239]

* intern.h (is_ruby_native_thread): prototype.

* missing/strftime.c (strftime): fix printf format and actual
  arguments.

* ext/Win32API/Win32API.c (Win32API_initialize): ditto.

* ext/tk/tcltklib.c (ip_finalize): ditto.

* ext/dl/ptr.c (rb_dlptr_inspect): ditto.  [ruby-dev:31268]

* ext/dl/sym.c (rb_dlsym_inspect): ditto.

* ext/socket/getnameinfo.c: include stdio.h always.

* ext/win32ole/win32ole.c (ole_hresult2msg, folevariable_name,
  folevariable_ole_type, folevariable_ole_type_detail,
  folevariable_value, folemethod_visible): missing return value.



git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_8@12835 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2007-07-22 05:33:47 +00:00
nobu
9bf8a37572 * bignum.c (rb_big_lshift, rb_big_rshift): separated functions
to get rid of infinite recursion.  fixed calculation in edge
  cases.  [ruby-dev:31244]

* numeric.c (rb_fix_lshift, rb_fix_rshift): ditto.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_8@12814 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2007-07-19 05:38:48 +00:00
nobu
409be50fe1 * eval.c (error_handle): no message when exiting by signal.
* eval.c (ruby_cleanup): re-send signal.  [ruby-dev:30516]

* eval.c (rb_thread_interrupt): instantiate SignalException.

* eval.c (rb_thread_signal_raise): now takes signal number instead
  of signal name.

* intern.h (rb_thread_signal_raise, ruby_default_signal): prototypes.

* signal.c (esignal_init): takes a signal number and an optional
  signal name.

* signal.c (interrupt_init): pass SIGINT always.

* signal.c (ruby_default_signal): invoke system default signal
  handler.

* signal.c (rb_signal_exec, trap): handle SIGTERM.  [ruby-dev:30505]


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_8@12025 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2007-03-11 03:09:30 +00:00
knu
af44ff5ea8 * dir.c, win32/win32.c, win32/dir.h, ruby.h, intern.h: Bring
encoding aware globbing support in from trunk.  Dir.[] and
  Dir.glob() can now take many patterns in an array.  Minor fixes
  will follow.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_8@11748 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2007-02-15 02:52:43 +00:00
aamine
2785c7c05f * ext/strscan/strscan.c (strscan_do_scan): should set kcode option before match. [ruby-dev:29914]
* test/strscan/test_stringscanner.rb: test it.
* re.c: export kcode_set_option and kcode_reset_option (with "rb_" prefix).
* intern.h: ditto.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_8@11524 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2007-01-10 09:59:11 +00:00
matz
720cfb3e60 * sprintf.c (rb_str_format): should preserve leading zero
information for negative %b and %x.  [ruby-talk:221347]


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_8@11236 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2006-10-30 02:24:08 +00:00
matz
b6f0af7888 * string.c (rb_str_intern): raise SecurityError only when $SAFE
level is greater than zero.  [ruby-core:08862]

* parse.y (rb_interned_p): new function to check if a string is
  already interned.

* object.c (str_to_id): use rb_str_intern().


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_8@10930 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2006-09-14 07:25:56 +00:00
matz
1b3beecb54 * re.c (rb_reg_initialize): should not modify untainted objects in
safe levels higher than 3.

* re.c (rb_memcmp): type change from char* to const void*.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_8@10156 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2006-05-16 00:25:18 +00:00
nobu
3da2897dc0 * configure.in, dln.c, file.c, intern.h, missing.h (eaccess): use
system routine if provided.  fixed: [ruby-core:07195]


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_8@9856 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2006-01-25 13:30:11 +00:00
ocean
2cb3480d22 * intern.h, file.c: failed to compile on windows.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_8@9593 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2005-11-23 02:06:00 +00:00
nobu
1cc1c2f77e * object.c (sym_inspect), parse.y (parser_yylex, rb_symname_p): check
if valid as a symbol name more strictly.  [ruby-dev:27478]

* test/ruby/test_symbol.rb: tests for [ruby-core:03573].


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_8@9439 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2005-10-22 04:09:24 +00:00
nobu
edecc47890 * eval.c (rb_obj_respond_to): check if obj responds to the given
method with the given visibility.  [ruby-dev:27408]

* eval.c (rb_respond_to): conform to Object#respond_to?.  [ruby-dev:27411]


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_8@9376 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2005-10-11 12:42:50 +00:00
nobu
79958f7c74 * eval.c (ev_const_get), variable.c (rb_const_get_0): retry only when
autoload succeeded.

* variable.c (rb_autoload_load): now return true if autoload
  succeeded.  fixed: [ruby-dev:27331]


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_8@9333 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2005-09-28 15:58:32 +00:00
matz
f87aa95e94 * signal.c (sigexit): call rb_thread_signal_exit() instead of
rb_exit().  [ruby-dev:26347]

* eval.c (rb_thread_signal_exit): a new function to exit on main
  thread.

* eval.c (rb_thread_switch): exit status should be retrieved from
  ruby_errinfo.

* eval.c (rb_f_exit): ensure exit(0) should call
  exit(EXIT_SUCCESS).

* missing/mkdir.c: remove. [ruby-core:05177]

* lib/delegate.rb (SimpleDelegator::__setobj__): need check for
  recursive delegation.  [ruby-core:04940]

* misc/ruby-mode.el (ruby-expr-beg): fix looking point drift.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_8@8614 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2005-06-12 16:58:43 +00:00
nobu
744ec6294c * st.h: fix prototypes.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_8@7445 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2004-12-03 03:25:49 +00:00
matz
f6348ca0ea * object.c (convert_type): [ruby-core:03845]
* eval.c (rb_funcall_rescue): new function.

* object.c (rb_Array): avoid using rb_respond_to().

* object.c (rb_Integer): ditto.

* eval.c (get_backtrace): no conversion for nil.

* parse.y (reduce_nodes): empty body should return nil.

* lib/cgi/session.rb (CGI::Session::initialize): [ruby-core:03832]


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_8@7414 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2004-11-29 06:13:52 +00:00
matz
c2a9b62fd2 * string.c (rb_str_locktmp): lock string temporarily.
* string.c (str_independent): add tmplock check.

* io.c (io_write): lock output string temporarily.
  [ruby-dev:24649]

* io.c (io_write): use rb_str_locktmp().

* io.c (read_all): ditto.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_8@7149 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2004-10-30 15:33:03 +00:00
matz
2ec51ee0d5 * string.c (str_gsub): reentrant check. [ruby-dev:24432]
* backport all SEGV bug fixes from CVS HEAD.  [ruby-dev:24536]


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_8@7090 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2004-10-20 12:47:20 +00:00
nobu
f11f8e5e92 * intern.h, object.c (rb_class_inherited_p): export.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_8@7067 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2004-10-18 23:54:34 +00:00
matz
f433be6d9c * io.c (rb_io_s_sysopen): preserve path in the buffer allocated by
ALLOCA_N() to prevent modification.  [ruby-dev:24438]

* io.c (rb_io_mode_flags): preserve append mode flag.
  [ruby-dev:24436]

* io.c (rb_io_modenum_mode): do not use external output buffer.

* string.c (rb_str_justify): differ pointer retrieval to prevent
  padding string modification.  [ruby-dev:24434]

* range.c (range_each_func): allow func to terminate loop by
  returning RANGE_EACH_BREAK.

* range.c (member_i): use RANGE_EACH_BREAK. [ruby-talk:114959]

* marshal.c (r_byte): retrieve pointer from string value for each
  time.  [ruby-dev:24404]

* marshal.c (r_bytes0): ditto.

* enum.c (sort_by_i): re-entrance check added.  [ruby-dev:24399]

* io.c (io_read): should freeze all reading buffer.
  [ruby-dev:24400]

* string.c (rb_str_sum): should use bignums when bits is greater
  than or equals to sizeof(long)*CHAR_BITS. [ruby-dev:24395]

* eval.c (specific_eval): defer pointer retrieval to prevent
  unsafe sourcefile string modification.  [ruby-dev:24382]

* eval.c (specific_eval): defer pointer retrieval to prevent
  unsafe sourcefile string modification.  [ruby-dev:24382]

* string.c (rb_str_sum): wrong cast caused wrong result.
  [ruby-dev:24385]

* enum.c (enum_sort_by): hide temporary array from
  ObjectSpace.each_object.  [ruby-dev:24386]

* string.c (rb_str_sum): check was done with false pointer.
  [ruby-dev:24383]


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_8@7003 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2004-10-06 15:15:12 +00:00
matz
6f9dcadf6e * string.c (rb_str_sum): check was done with false pointer.
[ruby-dev:24383]

* string.c (rb_str_sum): string may be altered.  [ruby-dev:24381]

* eval.c (rb_f_eval): defer pointer retrieval to prevent unsafe
  sourcefile string modification.  [ruby-dev:24373]

* io.c (io_read): block string buffer modification during
  rb_io_fread() by freezing it temporarily. [ruby-dev:24366]

* io.c (rb_io_s_popen): mode argument may be altered.
  [ruby-dev:24375]

* file.c (rb_file_s_basename): ext argument may be altered.
  [ruby-dev:24377]

* enum.c (enum_sort_by): use NODE instead of 2 element arrays.
  [ruby-dev:24378]

* string.c (rb_str_chomp_bang): StringValue() may change the
  receiver.  [ruby-dev:24371]


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_8@6979 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2004-10-02 03:50:53 +00:00
matz
adac65af93 * gc.c (define_final): should not disclose NODE* to Ruby world.
[ruby-dev:23957]


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_8@6691 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2004-07-23 07:52:38 +00:00
ocean
99a04c1adf * class.c, error.c, eval.c, intern.h, object.c, variable.c:
do not set path if it is a singleton class.  [ruby-dev:22588]
  (backport from 1.9)


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_8@6635 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2004-07-15 11:42:51 +00:00
nobu
4c20725d55 * eval.c (rb_eval_cmd, rb_thread_trap_eval): restore safe level.
* gc.c (define_final, run_final): preserve and restore safe level for
  finalizers.  [ruby-core:03058]

* signal.c (signal_exec, rb_trap_exit, trap): preserve and restore
  safe level for signal handlers.  [ruby-dev:23829]


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_8@6541 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2004-06-29 01:31:37 +00:00
matz
0cf6e773be * eval.c (eval): warning during eval should not cause deadlock.
[ruby-talk:98651]

* eval.c (rb_eval): raise TypeError exception for superclass
  mismatch.  [ruby-dev:39567]


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_8@6310 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2004-05-14 12:26:22 +00:00
nobu
33f89dbaf8 * intern.h: provide proper prototypes. [ruby-core:02724]
* ruby.h: missing.h is now prerequisite to intern.h.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_8@6055 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2004-03-31 03:05:22 +00:00
nobu
7c34e359a1 * class.c (rb_check_inheritable): new function. [ruby-dev:22316]
* intern.h: add prototype.

* eval.c (superclass): use rb_check_inheritable().

* object.c (rb_class_initialize): check argument validity.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@5236 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2003-12-21 08:29:06 +00:00
nobu
12b5b81a97 * dir.c (check_dirname): check string safety and remove extraneous
trailing directory separators.  [ruby-dev:22279]

* file.c: extern rb_path_next, rb_path_skip_prefix,
  rb_path_last_separator, rb_path_end.

* intern.h: prototypes for rb_path_next, rb_path_skip_prefix,
  rb_path_last_separator, rb_path_end.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@5191 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2003-12-15 04:07:03 +00:00
nobu
921d595fd4 * intern.h (ruby_stop): never return.
* ruby.h (ruby_run): ditto.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@4758 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2003-10-14 02:53:53 +00:00
nobu
4de0bb549b * eval.c (rb_feature_p): match by classified suffix.
* eval.c (rb_require_safe): require library in the specified safe
  level.

* variable.c (rb_autoload, rb_autoload_load): restore safe level
  when autoload was called.  [ruby-dev:21338]

* intern.h: prototypes; rb_require_safe.

* test/runner.rb: accept non-option arguments.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@4751 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2003-10-13 14:57:36 +00:00
matz
969f4d4c68 * ext/etc/etc.c: add new functions: setpwent, getpwent, endpwent,
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
2003-10-01 13:41:35 +00:00