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

896 Коммитов

Автор SHA1 Сообщение Дата
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 78592877b7 20011017
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@1791 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2001-10-17 05:29:47 +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 9be7984774 20011015
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@1786 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2001-10-15 15:18:24 +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
eban da23c37a31 2001-10-10
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@1784 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2001-10-10 11:32:43 +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 14129c8fa3 eval.c backout.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@1780 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2001-10-09 14:56:15 +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
eban 8ff29f818c 2001-10-05
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@1770 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2001-10-05 03:18:30 +00:00
nobu 85013a7915 * re.c (rb_reg_s_alloc): avoid inifinte recursion.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@1769 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2001-10-05 03:04:52 +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 c5da55fbdd 20010920
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@1755 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2001-09-20 14:54:34 +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
nobu 9d61bdff14 * eval.c, intern.h (rb_svar): return reference to special variable
from local variable index. [new]

* eval.c (rb_eval): use rb_svar() for NODE_FLIP{2,3}.

* parse.y (rb_(backref|lastline)_(get|set)): access via rb_svar().

* eval.c (proc_invoke): push dynamic variables.

* eval.c (rb_thread_yield): push special variables as dynamic
  variables($_, $~ and FLIP states).


* intern.h, parse.y (rb_is_local_id): return true if the ID is
  local symbol. [new]

* parse.y (internal_id): make new ID for internal use. [new]

* parse.y (cond0): allocate internal ID for NODE_FLIP{2,3}.

* eval.c (rb_f_local_variables): use rb_is_local_id() to select
  visible local variables.


* eval.c (rb_thread_start_0): SCOPE_SHARED is removed.

* eval.c, intern.h (rb_thread_scope_shared_p): removed. special
  variables are no longer shared by threads.

* re.c (rb_reg_search): MATCHDATA is no longer shared by threads.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@1752 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2001-09-20 06:23:50 +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
eban fce2bf70a2 * lib/jcode.rb: fixup quote handing.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@1738 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2001-09-06 08:12:24 +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 3c8ac80202 typo fix
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@1729 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2001-09-05 08:50:19 +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