Граф коммитов

704 Коммитов

Автор SHA1 Сообщение Дата
matz bbb608ad79 * bignum.c (rb_big_aref): idx may be a Bignum.
* numeric.c (fix_aref): negative index must return zero.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@1810 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2001-11-01 05:11:24 +00:00
matz a313c30d9c * gc.c (gc_mark_children): should NOT treat last element of
structs and arrays specially.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@1809 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2001-11-01 04:51:22 +00:00
matz a8c4400d1a * eval.c (exec_under): should initialize ruby_frame->self;
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@1808 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2001-10-31 08:00:18 +00:00
matz c0fe73989d * eval.c (POP_VARS): should not set DVAR_DONT_RECYCLE if _old
ruby_vars is already force_recycled.

* gc.c (rb_gc): handles mark stack overflow.

* gc.c (PUSH_MARK): use static mark stack, no more recursion.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@1807 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2001-10-31 06:53:22 +00:00
wakou 4c9362b74f * lib/cgi.rb: CGI::Cookie::parse(): Ignore duplicate keys caused by
Netscape bug.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@1805 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2001-10-30 17:48:24 +00:00
usa 8d321e3fd4 * win32/mkexports.rb: follow the change of rb_io_puts().
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@1804 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2001-10-30 09:23:14 +00:00
matz 54d534f043 * string.c (rb_str_chomp_bang): do smart chomp if $/ == '\n'.
* io.c (rb_io_puts): don't treat Array specially.

* bignum.c (rb_big_cmp): should convert bignum to float.

* eval.c (rb_f_eval): can't modify untainted binding.

* regex.c (re_compile_pattern): should preverve p0 value.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@1803 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2001-10-30 08:43:28 +00:00
usa 864bc4f18b * intern.h (rb_protect_inspect): follow the change of array.c.
* eval.c (rb_exec_end_proc): follow the change of rb_protect().

	* eval.c (method_proc, umethod_proc, rb_catch): cast the first
	  parameter of rb_iterate() to avoid VC++ warning.

	* range.c (range_step): ditto.

	* ext/sdbm/init.c (fsdbm_update, fsdbm_replace): ditto.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@1801 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2001-10-29 06:16:01 +00:00
matz 88abd791f5 * parse.y (str_extend): shuould allow interpolation of $-x.
* variable.c (rb_cvar_set): empty iv_tbl may cause infinite loop.

* variable.c (rb_cvar_get): ditto.

* variable.c (cvar_override_check): ditto.

* bignum.c (rb_big_eq): convert Bignum to Float, instead of
  reverse.

* time.c (time_localtime): getting tm should not be prohibited for
  frozen time objects.

* time.c (time_gmtime): ditto.

* version.c (Init_version): freeze RUBY_VERSION,
  RUBY_RELEASE_DATE, and RUBY_PLATFORM.

* file.c (Init_File): freeze File::SEPARATOR, ALT_SEPARATOR and
  PATH_SEPARATOR.

* file.c (rb_stat_cmp): should check operand type before calling
  get_stat().

* eval.c (rb_eval_cmd): should not invoke "call" with a block on
  any occasion.

* numeric.c (fix_aref): idx may be a Bignum.

* numeric.c (num_remainder): a bug in Numeric#remainder.

* eval.c (rb_exec_end_proc): END might be called within END
  block.

* class.c (rb_mod_clone): should not copy class name, since clone
  should remain anonymous.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@1800 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2001-10-29 05:07:26 +00:00
nobu 429f7ed113 * eval.c (proc_invoke): fix self switching in Proc#call
(ruby-bugs-ja#PR108) and GC failure.  use Qundef instead of 0
  to direct not switching self.

* eval.c (call_trace_func): ditto.

* eval.c (call_end_proc): ditto.

* eval.c (proc_call): ditto.

* eval.c (proc_yield): ditto.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@1798 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2001-10-22 16:28:51 +00:00
nobu 96baf2c092 * variable.c (rb_global_entry): reconstruct global variable
aliasing (sharing global_entry->var with other global_entry).

* variable.c (undef_getter): ditto.

* variable.c (undef_setter): ditto.

* variable.c (val_setter): ditto.

* variable.c (mark_global_entry): ditto.

* variable.c (rb_define_hooked_variable): ditto.

* variable.c (rb_f_trace_var): ditto.

* variable.c (remove_trace): ditto.

* variable.c (rb_f_untrace_var): ditto.

* variable.c (rb_gvar_get): ditto.

* variable.c (trace_en): ditto.

* variable.c (rb_gvar_set): ditto.

* variable.c (rb_gvar_defined): ditto.

* variable.c (rb_alias_variable): ditto.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@1797 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2001-10-22 16:20:14 +00:00
matz 959d5febcf * class.c (rb_mod_clone): should not copy class name, since clone
should remain anonymous.

* eval.c (rb_call0): self in a block given to define_method now be
  switched to the receiver of the method.

* eval.c (proc_invoke): added new parameter to allow self
  switching.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@1795 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2001-10-22 06:48:18 +00:00
nobu d0129370f0 * variable.c (remove_trace): should not access already freed area.
* variable.c (rb_f_untrace_var): fix memory leak.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@1793 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2001-10-21 13:22:54 +00:00
nobu eaab0aa79a * marshal.c (w_uclass): cloned class is not user
class. (ruby-bugs-ja#PR103)

* marshal.c (r_object): Struct subclass couldn't
  load. (ruby-bugs-ja#PR104)


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@1792 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2001-10-19 14:32:51 +00:00
nobu e725a1a6ab * variable.c (alias_fixup): added. ad hoc support for ordinary
global variable aliasing. when original entry is set, make the
  alias to refer directly as possible.

* variable.c (alias_getter, alias_setter): ditto.

* variable.c (rb_alias_variable): ditto. and no need to mark alias
  variables.

* variable.c (rb_gvar_defined): refer the original entry of an alias.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@1790 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2001-10-17 05:28:02 +00:00
nobu 7d9c2a6733 * eval.c (rb_f_missing): check stack level with rb_stack_check().
* eval.c (rb_call0): ditto.

* eval.c, intern.h (rb_stack_check): added. [new]


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@1789 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2001-10-16 15:17:10 +00:00
nobu 1c7cf852bd missing changelog.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@1788 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2001-10-16 05:21:16 +00:00
matz 5f877e8431 * string.c (rb_str_index): wrong increment for non alphanumeric
string.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@1787 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2001-10-16 03:27:23 +00:00
nobu 093595801f * parse.y (yylex): disallow alpha-numeric and mbchar for
terminator of %string.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@1785 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2001-10-15 15:15:45 +00:00
matz 8098dd6c80 * file.c (rb_stat_clone): should copy internal data too.
* numeric.c (num_clone): Numeric should not be copied by clone.

* object.c (rb_obj_clone): should check immediate values.

* parse.y (command): `yield' should take command_args.

* parse.y (parse_quotedwords): %w(...) is not a string.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@1782 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2001-10-10 08:21:13 +00:00
matz 9383505c40 * eval.c (rb_eval): NODE_MATCH3 was confusing left and right. sigh.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@1778 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2001-10-09 09:46:42 +00:00
eban 681b54c0bd * process.c (Init_process): activate the case NT.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@1777 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2001-10-09 09:42:47 +00:00
nobu 192b82bf4b * eval.c (thread_status_name): separated from
rb_thread_inspect(). return string expression for thread status.

* eval.c (rb_thread_status, rb_thread_inspect): use
  thread_status_name().

* eval.c (rb_thread_priority_set): return the priority not but
  self.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@1775 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2001-10-09 08:19:46 +00:00
matz ef52ffdf61 * marshal.c (w_unique): should not dump anonymous class.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@1773 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2001-10-05 06:30:42 +00:00
nobu 809a9c5b6d * eval.c (proc_s_new): revived.
* eval.c (Init_Proc): define Proc.new instead of Proc.allocate to
  inhibit from creating uninitialized Proc.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@1771 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2001-10-05 05:49:02 +00:00
matz 3358b44f6e * re.c (rb_reg_s_alloc): avoid inifinte recursion.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@1768 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2001-10-04 09:30:13 +00:00
eban ffcdd05412 * ext/socket/socket.c (ruby_connect): EALREADY is the equivalent
for EINPROGRESS in ws2_32.lib.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@1766 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2001-10-04 05:32:09 +00:00
nobu 822f1a5a59 * ext/gdbm/gdbm.c (rb_gdbm_fetch): str is a VALUE now.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@1765 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2001-10-03 07:52:09 +00:00
matz 1fe40b7cc5 * marshal.c (r_object): better allocation type check for
TYPE_UCLASS. usage of allocation framework is disabled for now.

* variable.c (rb_class_path): Module may have subclass.

* string.c (rb_str_update): should maintain original negative
  offset.

* string.c (rb_str_subpat_set): ditto

* string.c (rb_str_aset): ditto.

* re.c (rb_reg_nth_match): should check negative nth.

* re.c (rb_reg_nth_defined): ditto.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@1764 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2001-10-03 07:19:19 +00:00
eban d902111a57 * lib/ftools.rb (catname): allow trailing '/' for the destination.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@1763 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2001-10-02 10:36:34 +00:00
matz 75eee0bafd * ext/socket/socket.c (unix_addr): getsockname(2) may result len = 0.
* ext/socket/socket.c (unix_peeraddr): getpeername(2) may result
  len = 0.

* string.c (rb_str_subpat_set): support function for new argument
  pattern String#[re,offset] = val. [new]

* eval.c (POP_BLOCK): rb_gc_force_recycle() was called too much.
  Should not be called if SCOPE_DONT_RECYCLE is set.

* string.c (rb_str_aref_m): new argument pattern
  String#[re,offset]. [new]

* string.c (rb_str_substr): should return an instance of
  receiver's class.

* string.c (rb_str_succ): ditto.

* array.c (rb_ary_subseq): ditto.

* array.c (rb_ary_initialize): Array.new([1,2,3]) => [1,2,3]. [new]

* string.c (rb_str_reverse): should return an instance of
  receiver's class.

* string.c (rb_str_times): ditto.

* array.c (rb_ary_times): ditto

* string.c (str_gsub): ditto.

* string.c (rb_str_ljust): ditto.

* string.c (rb_str_rjust): ditto.

* string.c (rb_str_center): ditto.

* eval.c (eval): retrieves file, line information from binding.

* eval.c (intersect_fds): counts intersecting fds.

* eval.c (rb_thread_schedule): only fds requested by
  each thread count as select_value.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@1761 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2001-10-02 04:31:23 +00:00
nobu 34a31235c9 * marshal.c (r_object): TYPE_UCLASS check should be inversed.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@1759 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2001-10-01 23:28:57 +00:00
ts 810d9fcdbf Wed Sep 26 19:02:39 2001 Guy Decoux <ts@moulon.inra.fr>
* parse.y: allow 'primary[] = arg'


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@1757 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2001-09-26 17:09:47 +00:00
usa 906d9cc83b * win32/win32.c (isInternalCmd): check return value of NtMakeCmdVector (Tietew <tietew@tietew.net>'s patch).
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@1756 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2001-09-25 01:47:47 +00:00
nobu a8f1dd8d9f forgotten MATCH_DATA...
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@1754 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2001-09-20 12:51:58 +00:00
nobu 9fb8ea1fc7 for special local variable.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@1753 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2001-09-20 06:25:42 +00:00
matz 6767cd760a * string.c (rb_str_init): String.new() => ""
* dir.c (dir_path): new method.

* dir.c (dir_initialize): wrap DIR into struct, along with path
  information.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@1748 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2001-09-19 06:54:11 +00:00
matz 67245eec71 * eval.c (rb_thread_restore_context): save current value of
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
2001-09-08 14:17:53 +00:00
wakou 1bcc5eb922 * lib/net/telnet.rb: waitfor(): improvement. thanks to
nobu.nakada@nifty.ne.jp


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@1744 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2001-09-07 22:17:13 +00:00
wakou 6e2490beb5 * lib/net/telnet.rb: waitfor(): bug fix.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@1743 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2001-09-07 00:56:10 +00:00
wakou 749f0f9255 * lib/cgi.rb: CGI#doctype(): bug fix (html4Fr).
* lib/net/telnet.rb, lib/cgi.rb: remove VERSION, RELEASE_DATE,
	  VERSION_CODE, RELEASE_CODE. please use REVISION.

	* lib/cgi.rb: CGI#header(): bug fix.

	* lib/net/telnet.rb, lib/cgi.rb: concat --> +=


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@1742 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2001-09-06 22:18:11 +00:00
nobu aebf069adf * dir.c (dir_s_chdir): raise if environment variable HOME/LOGDIR
not set.

* dir.c (glob_helper): avoid infinite loop on a file name with
  wildcard characters. (ruby-bugs#PR177)


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@1740 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2001-09-06 08:48:07 +00:00
knu 970dbfde6f * ext/digest/digest.c (rb_digest_base_s_hexdigest): remove a debug
print.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@1736 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2001-09-06 05:29:27 +00:00
shugo 99ae768645 * ext/readline/readline.c: restore terminal mode
even if readline() interrupted.

* ext/readline/readline.c: returned string need to
  be tainted.

* ext/readline/readline.c: fixed memory leak.

* ext/readline/readline.c: allow negative index.

* ext/readline/readline.c: added Readline::HISTORY.size
  same as Readline::HISTORY.length

* ext/readline/readline.c: allow conditional parsing
  of the ~/.inputrc file by `$if Ruby'.

* ext/readline/extconf.rb: check whether the
  libreadline has the variable `rl_completion_append_character'
  (this feature was implemented from GNU readline 2.1).


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@1735 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2001-09-06 05:14:06 +00:00
knu 4c9a9a620a * ext/digest/digest.c (rb_digest_base_s_digest,
rb_digest_base_s_hexdigest): ensure that a string is given.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@1734 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2001-09-06 05:02:29 +00:00
eban d878585e5f * lib/jcode.rb (_regexp_quote): fix quote handling, again.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@1733 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2001-09-06 04:34:36 +00:00
nobu 0530ceb2b9 * file.c (rb_find_file_ext): add const qualifiers to ext.
* intern.h (rb_find_file_ext): ditto.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@1731 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2001-09-05 22:31:07 +00:00
nobu a09435ec20 * ext/socket/socket.c (Init_socket): remove duplicating constants.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@1730 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2001-09-05 22:18:56 +00:00
eban 2a67d0b9f9 * lib/jcode.rb (_regexp_quote): fix quote handling.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@1728 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2001-09-05 08:45:47 +00:00
matz 2e2786ccab * re.c (Init_Regexp): to_s to be alias to inspect.
* parse.y (yylex): should support 'keyword='.

* ruby.c (proc_options): should not adjust argc/argv if -e option
  is supplied.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@1727 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2001-09-05 06:54:57 +00:00
nobu 393f665e33 * intern.h (rb_find_file_ext): changed from rb_find_file_noext().
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@1725 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2001-09-03 11:30:58 +00:00
matz 0f35b58a2f * ruby.c (proc_options): should not alter origargv[].
* ruby.c (set_arg0): long strings for $0 dumped core.

* ruby.c (set_arg0): use setprogtitle() if it's available.

* io.c (rb_io_popen): accept integer flags as mode.

* file.c (rb_find_file_ext): extension table can be supplied from
  outside.  renamed.

* eval.c (rb_f_require): replace rb_find_file_noext by
  rb_find_file_ext.

* eval.c (rb_provided): should also check feature without
  extension.

* numeric.c (flo_to_s): do not rely on decimal point to be '.'


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@1722 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2001-09-03 05:37:42 +00:00
knu 50dcbc8cc6 * error.c: unbreak the build on *BSD with gcc 3.0.1 by removing
the conflicting declaration of sys_nerr for *BSD.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@1719 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2001-09-03 05:18:02 +00:00
nobu d1ad995dfd * ruby.c (set_arg0): prevent SEGV when val is longer than the
original arguments.

* ruby.c (ruby_process_options): initialize total length of
  original arguments at first.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@1715 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2001-09-01 01:25:09 +00:00
matz b47a99485b * parse.y (yylex): ternary ? can be followed by newline.
* eval.c (rb_f_require): should check static linked libraries
  before raising exception.

* array.c (rb_ary_equal): check identiry equality first.

* string.c (rb_str_equal): ditto.

* struct.c (rb_struct_equal): ditto.

* numeric.c (Init_Numeric): undef Integer::new.

* eval.c (rb_eval): NODE_WHILE should update result for each
  conditional evaluation.

* eval.c (rb_eval): NODE_UNTIL should return last evaluated value
  (or value given to break).


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@1714 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2001-08-29 06:28:51 +00:00
usa 3a42901a80 * dln.c (dln_strerror): fix a bug that sometimes made null message on
win32 (Tietew <tietew@tietew.net>'s patch).

* win32/win32.c (mystrerror): ditto.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@1709 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2001-08-24 05:45:55 +00:00
nobu 4ffb361630 fix typo.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@1708 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2001-08-23 17:49:08 +00:00
matz 1289a7a11f * eval.c (is_defined): should not dump core for "defined?(())".
* eval.c (umethod_bind): recv can be an instance of descender of
  oklass if oklass is a Module.

* hash.c (rb_hash_equal): check identiry equality first.

* file.c (group_member): should check real gid only.

* file.c (eaccess): do not cache euid, since effective euid may be
  changed via Process.euid=().

* file.c (eaccess): return -1 unless every specified access mode
  is permitted.

* eval.c (rb_eval): while/until returns the value which is given
  to break.

* parse.y (value_expr): using while/until/class/def as an
  expression is now gives a warning, not an error.

* range.c (range_eqq): should compare strings based on magical
  increment (using String#upto), not dictionary order.

* enum.c (enum_sort_by): new method for Schewartzian transformed
  stable sort.

* variable.c (mod_av_set): detect constant overriding for built-in
  classes/modules.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@1707 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2001-08-23 06:02:15 +00:00
eban e15efe7733 * ext/digest/sha2/extconf.rb: fix support for cross-compiling.
* mkconfig.rb: fix support for autoconf 2.52.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@1705 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2001-08-20 10:56:03 +00:00
matz ba294ad060 * parse.y (tokadd_escape): escaped backslashes too much.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@1704 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2001-08-20 06:15:53 +00:00
matz c786866812 * range.c (range_step): 'iter' here should be an array.
* marshal.c (w_object): should retrieve __member__ data from
  non-singleton class.

* variable.c (rb_cvar_get): class variable override check added.

* variable.c (rb_cvar_set): ditto

* variable.c (rb_cvar_declare): ditto.

* parse.y (parse_regx): handle backslash escaping of delimiter here.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@1703 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2001-08-20 04:29:58 +00:00
aamine 772ed5507e aamine
* lib/net/protocol.rb: Protocol.new requires at least one arg.
* lib/net/smtp.rb: ditto.
* lib/net/pop.rb: ditto.
* lib/net/http.rb: ditto.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@1700 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2001-08-17 03:08:45 +00:00
usa 9ba7324ceb * ext/socket/socket.c (s_recvfrom): fix typo.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@1690 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2001-08-16 04:54:31 +00:00
usa 429ad453f8 * ext/socket/socket.c (s_recvform): avoid VC++6 warning.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@1689 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2001-08-16 00:54:54 +00:00
usa e5de410caf * win32/win32.c (NtCmdGlob): avoid VC++ warning.
* lib/mkmf.rb: add -I$(srcdir) to CPPFLAGS.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@1687 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2001-08-15 18:51:58 +00:00
knu 6ce3130067 * ext/digest/*/extconf.rb: really fix so that they build from any
directory.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@1686 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2001-08-14 20:05:21 +00:00
knu ad4c17c021 * ext/digest/sha2/extconf.rb: fix so that they build from any
directory.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@1685 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2001-08-14 19:05:37 +00:00
knu 6a581e6317 * ext/digest/defs.h: Define NO_UINT64_T instead of emitting an
error to fail.

* ext/digest/sha2/extconf.rb: Do not exit on error, and utilize
  NO_UINT64_T to detect if the system has a 64bit integer type.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@1684 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2001-08-14 17:04:00 +00:00
knu 5b63fc556f * ext/digest/sha2/extconf.rb: do not create Makefile when no 64bit
integer type is detected.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@1683 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2001-08-14 12:15:21 +00:00
matz 04a8e85bc5 * range.c (range_step): new method.
* string.c (rb_str_cmp): remove needless conditional.

* string.c (rb_str_lstrip_bang) `return Qnil' was missing.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@1682 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2001-08-14 08:13:31 +00:00
knu 62bf905d4e * bignum.c, marshal.c: Detypo: s/SIZEOF_ING/SIZEOF_INT/.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@1678 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2001-08-13 05:17:38 +00:00
nobu 7e97ab23f8 * string.c (rb_str_cat): fix buffer overflow.
* string.c (rb_str_append): nothing to append actually when `str2'
  is empty.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@1675 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2001-08-12 09:41:39 +00:00
usa dfaaa55199 * win32/win32.h: fix problems with BC++ (ruby-bugs#PR161).
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@1673 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2001-08-07 00:21:40 +00:00
nobu f141f2e543 a problem about `associated' String and `str_buf'.
* pack.c (pack_unpack): associates p/P strings once at
  last(reverted to 1.26).

* string.c (rb_str_associate): associates an Array at once, not
  but a String. realloc's when str_buf.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@1672 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2001-08-06 15:05:50 +00:00
usa 2270c16ff9 * numeric.c (num_divmod): fix typo.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@1669 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2001-08-06 05:33:17 +00:00
matz 14cd947317 * struct.c (rb_struct_modify): should check frozen and taint
status.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@1667 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2001-08-06 03:08:57 +00:00
matz f33a61c28d * string.c (rb_str_lstrip_bang): new method.
* string.c (rb_str_rstrip_bang): new method.

* string.c (rb_str_associate): should consider STR_ASSOC too.

* eval.c (rb_undefined): do not recurse if method_missing is
  undefined.

* process.c (proc_waitpid): now all arguments are optional.

* process.c (Init_process): waitpid is now alias to wait.

* process.c (Init_process): waitpid2 is now alias to wait2.

* process.c (rb_waitpid): made public.

* ext/pty/pty.c (pty_getpty): avoid disturbing SIGCHLD using
  thread and rb_waitpid.

* process.c (proc_getpgrp): now takes no argument on all
  platforms.

* process.c (proc_setpgrp): ditto.

* ext/socket/socket.c (sock_s_pack_sockaddr_in): added
  Socket::pack_sockaddr_in(). [new]

* ext/socket/socket.c (sock_s_pack_sockaddr_un): added
  Socket::pack_sockaddr_un(). [new]

* ext/socket/socket.c (sock_s_pack_sockaddr_in): added
  Socket::unpack_sockaddr_in(). [new]

* ext/socket/socket.c (sock_s_pack_sockaddr_un): added
  Socket::unpack_sockaddr_un(). [new]


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@1666 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2001-08-06 03:05:23 +00:00
nobu 439b453e3a * file.c (strrdirsep): removed meaningless code.
* file.c (rb_file_s_expand_path): return to 1.66.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@1665 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2001-08-01 16:49:11 +00:00
usa cc6d8c466c * eval.c (ruby_run): avoid VC++ warning.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@1663 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2001-08-01 06:45:13 +00:00
usa 30637ef7e9 * marshal.c (Init_marshal): fix typos.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@1661 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2001-07-31 08:33:17 +00:00
nobu 4b7c92fa90 * process.c (last_status_set): nothing returned, should be void.
* ext/socket/socket.c (load_addr_info): ditto.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@1659 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2001-07-31 08:04:13 +00:00
matz c8a7361e45 * marshal.c (Init_marshal): new constant Marshal::MAJOR_VERSION
and Marshal::MINOR_VERSION.

* marshal.c (marshal_load): ruby_verbose test should be wrapped by
  RTEST().

* hash.c (rb_hash_index): should return nil (not the default
  value) if value is not in the hash.

* numeric.c (num_div): new method added.  alias to '/' which
  should be preserved even if '/' is redefined (e.g. by
  mathn). [new]

* bignum.c (rb_cstr2inum): "0 ff".hex should return 0, not 255.

* file.c (rb_file_s_expand_path): fixed using CharNext().


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@1658 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2001-07-31 06:24:45 +00:00
nobu 645170199c * file.c (rb_file_s_expand_path): scans per path element not per
byte/character, including fix of [ruby-talk:18152] and
  multi-byte pathname support.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@1655 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2001-07-30 22:41:59 +00:00
shugo 67d433a5e6 * lib/net/imap.rb: added new commands for managing folder quotas
and folder ACLs.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@1654 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2001-07-30 02:15:13 +00:00
matz 0abedcd807 * eval.c (rb_provided): extension should be guessed using
rb_find_file_noext().

* eval.c (rb_f_require): should call rb_feature_p() after
  extension completion.

* eval.c (rb_eval): add CHECK_INTS before next, redo, retry to
  avoid potential uninterruptable infinite loop.

* file.c (rb_file_s_expand_path): use CharNext() to expand.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@1653 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2001-07-27 09:12:12 +00:00
eban f30288ebf6 * file.c (rb_find_file_noext, rb_find_file): fix tilde expansion
problem.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@1649 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2001-07-26 03:54:48 +00:00
knu eb0f1ab783 * intern.h: add some missing function prototypes.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@1647 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2001-07-25 08:19:49 +00:00
nobu 4a74d867af * file.c (strrdirsep): multi-byte pathname and DOSish separater
supprot. originally comes from Patrick Cheng. [new]

* file.c (rb_file_s_basename, rb_file_s_dirname): use
  strrdirsep(). comes from Patrick Cheng.

* file.c (is_absolute_path): restricted in DOSish absolute path
  with drive letter, and UNC support. originally comes from
  Patrick Cheng.

* file.c (getcwd): define macro using getwd() unless provided.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@1646 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2001-07-24 15:11:02 +00:00
knu e54216b740 * ext/extmk.rb.in, lib/mkmf.rb: dig the target subdirectory for
lib/* files properly in case of create_makefile("dir/name").


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@1645 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2001-07-24 10:29:17 +00:00
matz 15ffbb1f82 * eval.c (rb_provide_feature): should not tweak extension used for
loading.

* io.c (io_fread): use fread(3) if PENDING_COUND is available.

* class.c (rb_mod_include_p): Module#include? added. [new]

* re.c (ignorecase_setter): give warning on modifying $=.

* string.c (rb_str_casecmp): new method. [new]

* string.c (rb_str_eql): separated from rb_str_equal(), make it
  always be case sensitive. [new]

* string.c (rb_str_hash): made it always be case sensitive.

* eval.c (rb_f_require): should not include path in $" value

* file.c (rb_find_file): should return 0 explicitly on failure.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@1642 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2001-07-24 09:07:33 +00:00
knu 9e214f30c4 * ext/extmk.rb.in, lib/mkmf.rb: introduce a couple of new make
variables: CLEANFILES and DISTCLEANFILES.  They'd typically be
  defined in a file "depend".


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@1640 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2001-07-22 12:24:12 +00:00
knu 33c679ba9a * gc.c (ruby_xrealloc): fix a dangling bug which led memory
reallocation to fail even though the second try after a GC
  succeeds.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@1639 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2001-07-20 15:20:25 +00:00
usa 2d84b42b00 * ruby.h: enable volatile directive with VC++.
* regex.c: ditto.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@1628 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2001-07-19 02:46:28 +00:00
aamine 2812249141 date-time was wrong.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@1625 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2001-07-18 20:59:03 +00:00
aamine b84329fb53 add doc/net/http.rd.ja pop.rd.ja smtp.rd.ja
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@1622 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2001-07-18 20:45:55 +00:00
matz f35971afdf * regex.c (NUM_FAILURE_ITEMS): was confusing NUM_REG_ITEMS and
NUM_NONREG_ITEMS, which have happened to be same value.

* class.c (rb_class_new): subclass check moved to this function.

* class.c (rb_class_boot): check less version of rb_class_new().

* eval.c (proc_invoke): should preserve iter status for embedded
  frame in the block.

* file.c (rb_file_s_expand_path): may overrun buffer on stack.

* string.c (rb_str_insert): forgot to call rb_str_modify().


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@1621 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2001-07-18 05:56:05 +00:00
aamine c068201c50 modify check-in miss.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@1618 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2001-07-17 05:25:15 +00:00
usa 9078b69592 * ext/extmk.rb.in: modify RM macro because command.com/cmd.exe don't
recognize single quotation as quote character.

* lib/mkmf.rb: ditto.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@1616 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2001-07-17 02:13:13 +00:00
usa affcf615dc * file.c (file_load_ok): fix typo.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@1614 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2001-07-16 04:22:46 +00:00
matz 03d1c9cd82 * regex.c (re_search): should consider reverse search.
* dir.c (dir_s_chdir): warn only when invoked from multiple
  threads or block is not given.

* object.c (rb_convert_type): should use rb_rescue(), not rb_rescue2().

* range.c (range_init): ditto.

* object.c (rb_obj_dup): should free generic_ivar if original owns
  them.

* string.c (rb_str_each_line): should propagate taint mark.

* ext/nkf/nkf.c (rb_nkf_kconv): ditto.

* eval.c (rb_f_require): revamp for simpler implementation.

* file.c (rb_find_file_noext): use String object, instead of
  passing char* around.

* file.c (rb_find_file): ditto.

* dln.c (dln_load): should use NSLINKMODULE_OPTION_BINDNOW.

* ruby.c (load_file): local variables 'c' remain uninitialized on
  xflag.

* regex.c (re_match): prefetched escaped character too early.

* eval.c (rb_call0): add argument check for attr_readers.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@1612 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2001-07-14 15:17:19 +00:00
knu f4b516777b * ext/digest/*/extconf.rb: fix so that they build from any
directory.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@1611 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2001-07-14 03:29:50 +00:00
aamine a2193f50e8 aamine
* lib/net/http.rb: HTTP#proxy? did not worked.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@1610 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2001-07-13 21:20:41 +00:00
knu 6ecd6fe37b * ext/extmk.rb.in: support multi-level ext/ directories.
(e.g. you can have ext/foo, ext/foo/bar and ext/foo/baz)

* ext/.cvsignore: let cvs ignore extinit.c.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@1608 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2001-07-13 18:02:10 +00:00
knu c0a9b71aeb * lib/mkmf.rb: use File::split to split a target into a prefix and
a module name.  This also works around a just found bug of
  String#rindex.

* ext/extmk.rb.in: ditto.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@1605 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2001-07-13 14:19:28 +00:00
eban 18efb38b21 * ext/socket/socket.c (ruby_connect): workaround for the setup of
Cygwin socket(EALREADY).


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@1589 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2001-07-12 06:16:49 +00:00
eban f1b3c51701 * lib/mkmf.rb: modify RM macro.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@1582 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2001-07-09 08:10:26 +00:00
eban 4d134d47d6 * ext/extmk.rb.in: modify RM macro.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@1580 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2001-07-09 07:54:49 +00:00
knu e45f8f9943 * ruby.h: fix a wrong function name: rb_iglob() -> rb_globi().
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@1579 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2001-07-08 11:54:55 +00:00
aamine 2b67bb576a aamine
* lib/net/http.rb: rename HTTP#request_by_name to send_request.
* lib/net/protocol.rb (ProtoSocket#read): modify typo.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@1577 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2001-07-08 07:00:23 +00:00
knu 7f326a3988 * lib/tempfile.rb: a tempfile must be created with mode 0600.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@1572 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2001-07-05 17:19:28 +00:00
aamine afb3a0cff1 aamine
* lib/net/http.rb (HTTP#request_by_name): arg order changes.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@1566 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2001-07-03 19:18:17 +00:00
aamine 9e79454b3d aamine
* lib/net/http.rb (HTTP#request_by_name): bug fix.
* lib/net/http.rb: does not write Connection: by default.
* lib/net/protocol.rb: "start" for started protocol is an error.
* lib/net/protocol.rb: "finish" for finished protocol is an error.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@1565 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2001-07-03 19:03:16 +00:00
aamine fa20d931bc aamine
* lib/net/http.rb: new method HTTP#request_by_name (test)
* lib/net/http.rb: new class HTTPGenericRequest


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@1564 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2001-07-03 18:13:13 +00:00
knu fc1f22d5a8 * lib/mkmf.rb: distclean should remove mkmf.log as well.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@1560 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2001-07-03 15:02:20 +00:00
matz f7ac4f227d * eval.c (rb_eval_string_wrap): should push frame (and adjust
cbase) before wrapped eval.

* eval.c (rb_eval_cmd): ditto.

* eval.c (eval): should update ruby_class always after all.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@1559 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2001-07-03 09:37:08 +00:00
matz 08eef47e5b credit rb_name_error() fix to Nobuyoshi Nakada.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@1558 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2001-07-03 07:29:00 +00:00
shugo 604a8f1883 * eval.c (block_pass): do not change wrapper information.
* eval.c (rb_yield_0):  preserve wrapper information.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@1557 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2001-07-03 05:57:16 +00:00
shugo 066cfdc133 * error.c (rb_name_error): raise NameError instead of LoadError.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@1556 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2001-07-03 05:52:20 +00:00
matz ffe1cf575e * error.c (exc_exception): clone the receiver exception instead of
creating brand new exception object of the receiver.

* eval.c (rb_eval_string_wrap): extend new ruby_top_self, not
  original self.

* eval.c (rb_eval_cmd): respect ruby_wrapper if set.

* eval.c (eval): do not update ruby_class unless scope is not
  provided.

* eval.c (eval): preserve wrapper information.

* eval.c (proc_invoke): ditto.

* eval.c (block_pass): ditto.

* parse.y (void_expr): too much warnings for void context
  (e.g. foo[1] that can be mere Proc call).

* error.c (rb_name_error): new function to raise NameError with
  name attribute set.

* eval.c (rb_f_missing): set name and args in the exception
  object. [new]

* error.c (name_name): NameError#name - new method.

* error.c (nometh_args): NoMethodError#args - new method.

* lex.c (rb_reserved_word): lex_state after tRESCUE should be
  EXPR_MID.

* gc.c (add_heap): allocation size of the heap unit is doubled for
  each allocation.

* dir.c (isdelim): space, tab, and newline are no longer
  delimiters for glob patterns.

* eval.c (svalue_to_avalue): new conversion scheme between single
  value and array values.

* eval.c (avalue_to_svalue): ditto.

* eval.c (rb_eval): REXPAND now uses avalue_to_svalue(), return
  and yield too.

* eval.c (rb_yield_0): use avalue_to_svalue().

* eval.c (proc_invoke): Proc#call gives avaules, whereas
  Proc#yield gives mvalues.

* eval.c (bmcall): convert given value (svalue) to avalue.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@1555 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2001-07-02 08:46:28 +00:00
keiju cc13bb43bc * lib/matrix.rb: resolve 'ruby -w' warnings.
* lib/irb/locale.rb: resolve 'ruby -w' warnings.
* lib/irb/multi-irb.rb: resolve 'ruby -w' warnings.
* lib/irb/ruby-lex.rb: fix problem for "\\M-\\..." and "\\C-\\..."
  and resolve 'ruby -w' warnings.
* lib/irb/ruby-token.rb: fix typo
* lib/shell/command-processor.rb: resolve 'ruby -w' warnings.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@1550 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2001-06-27 15:35:04 +00:00
aamine 37b3f674a7 sorry, check in miss.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@1547 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2001-06-26 23:51:16 +00:00
aamine c664027a34 aamine
* lib/net/pop.rb: new methods POP3.auth_only, POP3#auth_only
* lib/net/http.rb: HTTP.Proxy returns self if ADDRESS is nil.
* lib/net/protocol.rb: new method ProtocolError#response
* lib/net/protocol.rb,smtp.rb,pop.rb,http.rb: add document.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@1546 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2001-06-26 23:49:21 +00:00
knu c0648ecc85 * ext/readline/readline.c (readline_event): a non-void function
should return a value.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@1540 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2001-06-23 09:30:42 +00:00
eban 2cf4fce053 * ext/socket/socket.c (ruby_connect): workaround for the setup of
Cygwin socket.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@1538 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2001-06-22 14:44:44 +00:00
keiju cdabb04b44 * lib/irb/locale.rb: fix for require "kconv" problem
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@1537 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2001-06-22 14:16:25 +00:00
matz def42c9a0c * eval.c (rb_yield_0): no mvalue_to_svalue conversion here.
* eval.c (massign): takes svalue, convert it to mvalue inside.

* eval.c (rb_eval): parameters for yield/return are always
  svalues now.

* eval.c (svalue_to_mvalue): more strict conversion.

* eval.c (mvalue_to_svalue): ditto.

* st.c (new_size): prime hash size enabled.

* ext/socket/socket.c (Init_socket): SO_* constants added.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@1535 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2001-06-22 09:12:24 +00:00
eban ef8e0b4dff * gc.c (rb_setjmp): avoid GCC 3.0 warnings.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@1532 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2001-06-19 15:42:00 +00:00
knu 0c92a85e6a * ext/readline/readline.c: add new methods:
Readline::completion_append_character and
  Readline::completion_append_character=.k


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@1530 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2001-06-19 09:21:38 +00:00
matz 058888bd38 * eval.c (svalue_to_mvalue): new function to convert from svalue
to mvalue. [experimental]

* eval.c (mvalue_to_svalue): new function to convert from mvalue
  to svalue.

* eval.c (rb_eval): use mvalue_to_svalue().

* eval.c (rb_yield_0): use mvalue_to_svalue().

* eval.c (proc_invoke): proper mvalue handling.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@1529 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2001-06-19 07:33:10 +00:00
matz 9d51cf8a6a * eval.c (rb_f_require): searches ".rb" and ".so" at the same
time.  previous behavior (search ".rb", then ".so") has a
  security risk (ruby-bugs#PR140).

* array.c (rb_ary_to_ary): new function to replace internal
  rb_Array(), which never calls to_a, but to_ary (rb_Array() might
  call both). [new]

* regex.c (PUSH_FAILURE_POINT): push option status again.

* regex.c (re_compile_pattern): avoid pushing unnecessary
  option_set.

* eval.c (rb_load): tainted string is OK if wrapped *and*
  $SAFE >= 4.

* eval.c (rb_thread_start_0): should not nail down higher blocks
  before preserving original context (i.e. should not alter
  original context).

* eval.c (proc_yield): new method equivalent to Proc#call but no
  check for number of arguments. [new]


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@1526 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2001-06-19 04:35:17 +00:00
knu 6aa71d4c80 * dir.c (Init_Dir): add a new method File::fnmatch? along with
File::Constants::FNM_*.  While I am here, FNM_NOCASE is renamed
  to FNM_CASEFOLD which is commonly used by *BSD and GNU libc.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@1525 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2001-06-13 10:51:39 +00:00
matz 39fb2a27ab * eval.c (method_eq): new method Method#==. [new]
* gc.c (STR_NO_ORIG): STR_NO_ORIG value was different between
  string.c and gc.c

* eval.c (rb_eval): should convert *non-array at the end of
  arguments by using Array().

* hash.c (ruby_setenv): readline library leaves their environment
  strings uncopied.  "free" check revised.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@1523 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2001-06-12 05:31:47 +00:00
knu 83b2db9ea7 * lib/mkmf.rb: target_prefix is only for installation, not for
build.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@1522 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2001-06-12 05:25:04 +00:00
eban c88531e4b9 * confgure.in: add RUBY_CANONICAL_BUILD.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@1520 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2001-06-11 05:31:17 +00:00
usa a5c0e5a382 * ext/extmk.rb.in: Use -F and -T for mswin32 because cl.exe doesn't support -o officially and cl.exe considers that *.cc and *.cxx are OBJs.
* lib/mkmf.rb: ditto.

* win32/Makefile.sub: Use del instead of rm. All these changes are derived from Nobuyoshi Nakada's patch. Thanks.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@1519 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2001-06-09 07:41:44 +00:00
matz 46e8ae1104 * gc.c (Init_stack): avoid __builtin_frame_address(2) to retrieve
stack bottom line.

* st.c (numhash): should shuffle bits by dividing by prime number.

* eval.c (rb_eval): multiple assignment behavior fixed, which
  results "*a = nil" makes "a == []" now.

* eval.c (rb_f_require): should set SCOPE_PUBLIC before calling
  dln_load().


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@1516 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2001-06-08 14:20:58 +00:00
matz 4c6b76c1e4 * parse.y (yylex): exclude kDO_BLOCK too much by false condition.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@1514 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2001-06-07 08:29:59 +00:00
keiju 85d105cf8c * lib/sync.rb: bug fix if obj.initialize has parameters when
obj.extend(Sync_m)

* lib/mutex_m.rb: modified bit


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@1513 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2001-06-06 14:19:33 +00:00
matz f0ccffd530 * eval.c (rb_load): should check if tainted even when wrap is
specified.

* regex.c (re_compile_pattern): too much optimization for the
  cases like /(.|a)b/.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@1509 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2001-06-06 07:40:31 +00:00
matz 7c9c33e9ad * parse.y (aref_args): "*arg" should always be expanded by REXPAND.
* variable.c (fc_i): removed vast string allocation.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@1507 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2001-06-06 06:42:23 +00:00
matz b12904e85f * error.c (Init_Exception): NameError went under StandardError,
and NoMethodError went under NameError.

* parse.y (rb_intern): non identifier symbols should be
  categorized as ID_JUNK. [new]


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@1505 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2001-06-05 07:50:59 +00:00
matz d6c60dbf6d * variable.c (rb_mod_const_at): use hash table as internal
data. [new]

* variable.c (rb_mod_const_of): ditto.

* variable.c (rb_const_list): new function to convert internal
  data (hash table) to array of strings.

* eval.c (rb_mod_s_constants): data handling scheme has changed.

* eval.c (rb_add_method): should not call rb_secure(), for
  last_func may not be set.

* io.c (rb_io_ctl): ioctl should accept any integer within C long
  range.

* marshal.c (r_object): wrong type check for modules.

* marshal.c (w_object): should not dump anonymous classes/modules.

* io.c (rb_open_file): use rb_file_sysopen_internal() if the 3rd
  argument (permission flags) is given. [new, should be backported?]

* io.c (rb_io_mode_binmode): mode string (e.g. "r+") to flags to
  open(2).

* eval.c (rb_eval): NODE_REXPAND expand an array of 1 element as
  the element itself. [new, should be backported?]

* parse.y (ret_args): should treat "*[a]" in rhs expression as
  "a", not "[a]".

* regex.c (re_compile_pattern): should push option modifier at the
  right place.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@1504 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2001-06-05 07:19:39 +00:00
eban ac376af4f4 * ext/etc/extconf.rb: use egrep_cpp.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@1500 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2001-06-05 04:43:17 +00:00
wakou bfd441db8f * lib/shellwords.rb: don't destroy argument.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@1491 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2001-06-03 19:25:07 +00:00
shugo 7dc25230be * lib/cgi/session.rb: don't use module_function for Class.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@1490 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2001-06-02 14:19:37 +00:00
keiju 3c024ba5e2 * irb messages: fix typos.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@1489 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2001-06-01 15:26:47 +00:00
matz 23f89a8932 * hash.c (replace_i): ignore when key == Qundef.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@1488 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2001-06-01 09:38:30 +00:00
matz da548b67f5 * parse.y (call_args2): confusion with list_append() and
list_concat() was fixed.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@1486 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2001-06-01 07:52:34 +00:00
matz 353650e6b4 * parse.y (yylex): fixed 'print CGI::bar() {}, "\n"' syntax
breakage, adding new lex_state status.  sigh. [new]

* file.c (rb_file_s_unlink): should not allow if $SAFE >= 2.

* range.c (Init_Range): define "to_ary".


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@1485 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2001-06-01 06:47:32 +00:00
eban e8fb16c70f * configure.in: use waitpid on mingw32.
* ext/dbm/extconf.rb: include <ndbm.h>, not <gdbm.h>.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@1481 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2001-06-01 02:25:28 +00:00