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

182 Коммитов

Автор SHA1 Сообщение Дата
nobu 62af481d0e * 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/trunk@9439 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2005-10-22 04:09:24 +00:00
matz 5b014a7427 * bin/erb (ERB::Main::run): typo fixed. [ruby-core:06337]
* env.h: move struct METHOD and struct BLOCK from eval.c to
  support NodeWrap and ParseTree.

* rubysig.h (CHECK_INTS): prevent signal handler to run during
  critical section.  [ruby-core:04039]

* eval.c (load_wait): need not to call rb_thread_schedule()
  explicitly.  [ruby-core:04039]

* eval.c (rb_thread_schedule): clear rb_thread_critical.
  [ruby-core:04039]

* eval.c (rb_obj_instance_exec): create instance_exec and
  module_exec which pass arguments to the block.

* eval.c (rb_f_funcall): rename fcall to funcall to follow
  tradition.

* st.c (st_free_table): do not call free() but xfree().
  [ruby-core:06205]

* eval.c (splat_value): call rb_Array() to convert svalue to
  values.  [ruby-dev:27397]

* lib/cgi.rb (CGI::Cookie::parse): Cookies from Nokia devices may
  not be parsed correctly.  A patch from August Z. Flatby
  (augustzf) in [ruby-Patches-2595].  [ruby-core:06183]

* object.c (rb_Array): Array() to raise error for objects without
  to_ary, nor to_a.

* object.c (nil_to_a): revert NilClass#to_a.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@9436 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2005-10-21 09:00:02 +00:00
matz 22f1926644 * range.c (rb_range_beg_len): should return Qfalse for non-range
object.

* pack.c (EXTEND16): [ruby-dev:27383]

* eval.c (set_trace_func): add rb_secure(4) to prevent adding
  tracing function.

* lib/delegate.rb: document update from James Edward Gray II
  <james@grayproductions.net>.  [ruby-core:05942]

* process.c (proc_daemon): should restrict execution on levels
  higher than $SAFE=2.  suggested by URABE Shyouhei
  <shyouhei@ice.uec.ac.jp>.

* lib/forwardable.rb: replaced by new implementation from
  <Daniel.Berger@qwest.com>.  [ruby-core:05899]

* file.c (path_check_0): disallow sticky world writable directory
  in PATH (and $LOAD_PATH).  [ruby-dev:27226]

* numeric.c (fix_idiv): 1.div(1.0) should return integer value.
  [ruby-dev:27235]

* lib/yaml.rb: require 'yaml/constants'.  [ruby-core:5776]

* lib/xmlrpc/client.rb (XMLRPC::Client::do_rpc): add charset
  information to content-type header.[ruby-core:5127]

* lib/xmlrpc/server.rb (CGIServer::serve): ditto.

* lib/xmlrpc/server.rb (ModRubyServer::serve): ditto.

* lib/xmlrpc/server.rb (WEBrickServlet::service): ditto.

* test/dbm/test_dbm.rb (TestDBM::test_s_open_error): remove
  test_s_open_error test to detect duplicate open.
  [ruby-dev:27202]

* eval.c (splat_value): use to_a to splat non Array object.

* object.c (nil_to_a): remove nil.to_a.  [experimental]


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@9349 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2005-10-05 16:15:16 +00:00
ocean dda5dc00cf * array.c: moved to ANSI function style from K&R function style.
(used protoize on windows, so still K&R remains on #ifdef part of
   other platforms. And  `foo _((boo))' stuff is still there)
   [ruby-dev:26975]

* bignum.c, class.c, compar.c, dir.c, dln.c, dmyext.c, enum.c,
  enumerator.c, error.c, eval.c, file.c, gc.c, hash.c, inits.c,
  io.c, main.c, marshal.c, math.c, numeric.c, object.c, pack.c,
  prec.c, process.c, random.c, range.c, re.c, regcomp.c, regenc.c,
  regerror.c, regexec.c, regparse.c, regparse.h, ruby.c, signal.c,
  sprintf.c, st.c, string.c, struct.c, time.c, util.h, variable.c,
  version.c: ditto.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@9126 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2005-09-12 10:44:21 +00:00
matz f1efc08bb1 * missing/strchr.c (strrchr): fixed a bug for detecting NUL in a
string.  [ruby-dev:26985]

* string.c (rb_str_times): should taint empty strings as well.

* object.c (Init_Object): make class_variable_{get,set} public.
  [ruby-dev:26965]


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@9100 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2005-09-08 04:42:46 +00:00
nobu 68655d09a1 * intern.h (rb_check_to_integer): add declaration.
* object.c (rb_to_integer, rb_check_to_integer): argument constified.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@8990 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2005-08-14 22:25:09 +00:00
matz 53b4c2b87a * numeric.c (fix_div): should not convert the result into
integer.  [ruby-core:05524]


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@8905 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2005-08-04 04:31:33 +00:00
matz 759a63b6a3 * parse.y (lambda): Perl6 style -> lambda expression. [NEW]
[VERY EXPERIMENTAL]

* gc.c (id2ref): must not assign pointers to long int.  use
  LONG_LONG instead if SIZEOF_LONG < SIZEOF_VOIDP.
  [ruby-talk:149645]

* ruby.h: use LONG_LONG to simplify the change.
  [ruby-talk:149645]

* dir.c (dir_each): rewinddir(3) before iteration.
  [ruby-talk:149628]

* eval.c (rb_f_throw): replace all '0x%lx' by '%p'.
  [ruby-talk:149553]

* missing/vsnprintf.c (BSD_vfprintf): '%p' need to handle 64bit
  size pointer.  [ruby-talk:149553]


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@8847 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2005-07-27 07:27:19 +00:00
nobu 6524f34a26 * sprintf.c (rb_vsprintf, rb_sprintf): new functions return new String,
using missing/vsnprintf.c.  [ruby-dev:26580]

*  missing/vsnprintf.c: made the output changeable.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@8825 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2005-07-23 01:02:18 +00:00
matz 2201229b4a * variable.c (rb_class_path): need to adjust snprintf() len for
teminating NUL.  [ruby-dev:26581]

* error.c (syserr_initialize): don't use str before StringValue()
  check.  [ruby-dev:26579]


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@8807 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2005-07-20 01:08:13 +00:00
matz 2031602787 * signal.c (trap): remove sigexit(); handle "EXIT" via sig_exec().
[ruby-dev:26440]

* io.c (rb_io_inspect): replace sprintf() with "%s" format all
  over the place by snprintf() to avoid integer overflow.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@8800 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2005-07-19 08:31:04 +00:00
matz 7b7c037179 * object.c (rb_obj_pattern_match): now returns nil.
[ruby-core:05391]

* sample/svr.rb: service can be stopped by ill-behaved client; use
  tsvr.rb instead.

* missing/erf.c: original erf.c by prof. Okumura is confirmed to
  be public domain.  reverted BSD implementation.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@8732 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2005-07-06 09:47:08 +00:00
matz 6fcad7f1c5 * eval.c (break_jump): break should not cross functions.
[ruby-list:40818]


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@8423 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2005-05-11 07:00:32 +00:00
matz feda16cbd4 * eval.c (rb_call0): reorganize "return" event post.
* eval.c (return_jump): no need to post "return" event here.

* object.c (str_to_id): raise ArgumentError for NUL containing
  strings.

* parse.y (primary): wrong var node was set for NODE_LAMBDA.
  [ruby-core:04555]

* re.c (make_regexp): need to free internal regexp structure when
  compilation fails.  [ruby-talk:133228]

* parse.y (bv_decl): remove initialize rule from block local
  variable declaration.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@8160 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2005-03-16 09:25:45 +00:00
matz 6645b92826 * object.c (inspect_obj): unintended space removal.
[ruby-dev:25810]

* eval.c (rb_exec_recursive): should not use NODE in disclosed
  context.  [ruby-dev:25812]

* io.c (rb_f_open): need not to check if to_open value is a
  T_FILE.  [ruby-dev:25812]


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@8098 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2005-03-07 02:05:08 +00:00
matz 70bbad3cfd * array.c: replace rb_protect_inspect() and rb_inspecting_p() by
rb_exec_recursive() in eval.c.

* eval.c (rb_exec_recursive): new function.

* array.c (rb_ary_join): use rb_exec_recursive().

* array.c (rb_ary_inspect, rb_ary_hash): ditto.

* file.c (rb_file_join): ditto.

* hash.c (rb_hash_inspect, rb_hash_to_s, rb_hash_hash): ditto.

* io.c (rb_io_puts): ditto.

* object.c (rb_obj_inspect): ditto

* struct.c (rb_struct_inspect): ditto.

* lib/set.rb (SortedSet::setup): a hack to shut up warning.
  [ruby-talk:132866]

* lib/time.rb (Time::strptime): add new function.  inspired by
  [ruby-talk:132815].

* lib/parsedate.rb (ParseDate::strptime): ditto.

* regparse.c: move st_*_strend() functions from st.c.  fixed some
  potential memory leaks.

* exception error messages updated.  [ruby-core:04497]

* ext/socket/socket.c (Init_socket): add bunch of Socket
  constants.  Patch from Sam Roberts <sroberts@uniserve.com>.
  [ruby-core:04409]

* array.c (rb_ary_s_create): no need for negative argc check.
  [ruby-core:04463]

* array.c (rb_ary_unshift_m): ditto.

* lib/xmlrpc/parser.rb (XMLRPC::FaultException): make it subclass
  of StandardError class, not Exception class.  [ruby-core:04429]

* parse.y (fcall_gen): lvar(arg) will be evaluated as
  lvar.call(arg) when lvar is a defined local variable. [new]

* object.c (rb_class_initialize): call inherited method before
  calling initializing block.

* eval.c (rb_thread_start_1): initialize newly pushed frame.

* lib/open3.rb (Open3::popen3): $? should not be EXIT_FAILURE.
  fixed: [ruby-core:04444]

* eval.c (is_defined): NODE_IASGN is an assignment.

* ext/readline/readline.c (Readline.readline): use rl_outstream
  and rl_instream.  [ruby-dev:25699]

* ext/etc/etc.c (Init_etc): sGroup needs HAVE_ST_GR_PASSWD check
  [ruby-dev:25675]

* misc/ruby-mode.el: [ruby-core:04415]

* lib/rdoc/generators/html_generator.rb: [ruby-core:04412]

* lib/rdoc/generators/ri_generator.rb: ditto.

* struct.c (make_struct): fixed: [ruby-core:04402]

* ext/curses/curses.c (window_color_set): [ruby-core:04393]

* ext/socket/socket.c (Init_socket): SO_REUSEPORT added.
  [ruby-talk:130092]

* object.c: [ruby-doc:818]

* parse.y (open_args): fix too verbose warnings for the space
  before argument parentheses.  [ruby-dev:25492]

* parse.y (parser_yylex): ditto.

* parse.y (parser_yylex): the first expression in the parentheses
  should not be a command.  [ruby-dev:25492]

* lib/irb/context.rb (IRB::Context::initialize): [ruby-core:04330]

* object.c (Init_Object): remove Object#type.  [ruby-core:04335]

* st.c (st_foreach): report success/failure by return value.
  [ruby-Bugs-1396]

* parse.y: forgot to initialize parser struct.  [ruby-dev:25492]

* parse.y (parser_yylex): no tLABEL on EXPR_BEG.
  [ruby-talk:127711]

* document updates - [ruby-core:04296], [ruby-core:04301],
  [ruby-core:04302], [ruby-core:04307]

* dir.c (rb_push_glob): should work for NUL delimited patterns.

* dir.c (rb_glob2): should aware of offset in the pattern.

* string.c (rb_str_new4): should propagate taintedness.

* env.h: rename member names in struct FRAME; last_func -> callee,
  orig_func -> this_func, last_class -> this_class.

* struct.c (rb_struct_set): use original method name, not callee
  name, to retrieve member slot.  [ruby-core:04268]

* time.c (time_strftime): protect from format modification from GC
  finalizers.

* object.c (Init_Object): remove rb_obj_id_obsolete()

* eval.c (rb_mod_define_method): incomplete subclass check.
  [ruby-dev:25464]

* gc.c (rb_data_object_alloc): klass may be NULL.
  [ruby-list:40498]

* bignum.c (rb_big_rand): should return positive random number.
  [ruby-dev:25401]

* bignum.c (rb_big_rand): do not use rb_big_modulo to generate
  random bignums.  [ruby-dev:25396]

* variable.c (rb_autoload): [ruby-dev:25373]

* eval.c (svalue_to_avalue): [ruby-dev:25366]

* string.c (rb_str_justify): [ruby-dev:25367]

* io.c (rb_f_select): [ruby-dev:25312]

* ext/socket/socket.c (sock_s_getservbyport): [ruby-talk:124072]

* struct.c (make_struct): [ruby-dev:25249]

* dir.c (dir_open_dir): new function.  [ruby-dev:25242]

* io.c (rb_f_open): add type check for return value from to_open.

* lib/pstore.rb (PStore#transaction): Use the empty content when a
  file is not found.  [ruby-dev:24561]


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@8068 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2005-03-04 06:47:45 +00:00
nobu b4114b4dc7 * object.c (rb_class_superclass): superclass of singleton class also
should be a singleton class.  fixed: [ruby-list:40519]


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@7768 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2005-01-11 15:36:52 +00:00
matz e0ddacfc36 * ext/syck/rubyext.c (rb_syck_io_str_read): [ruby-core:03973]
* object.c (rb_obj_id_obsolete): warn always.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@7569 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2004-12-15 16:01:11 +00:00
matz 405a50a594 * eval.c (proc_invoke): prepare to pass a block from "call" method
to a Proc generated by Method#to_proc.  [ruby-dev:25031]

* eval.c (rb_yield_0): actually passes a block given to "call".

* object.c (convert_type): use rb_respond_to() again.  this fix is
  based on [ruby-dev:25021]

* eval.c (rb_respond_to): funcall respond_to? if it's redefined.
  [ruby-dev:25021]


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@7446 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2004-12-03 04:56:25 +00:00
matz 83cb605d69 * 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.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@7413 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2004-11-29 06:09:40 +00:00
matz b93479b8d9 * string.c (str_mod_check): frozen check should be separated.
[ruby-core:3742]


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@7280 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2004-11-16 04:55:14 +00:00
matz 018837b84f * node.h (NODE_TYPESHIFT): allow 4 more bits for line numbers.
[ruby-talk:117841]

* ruby.h (FL_ABLE): nodes are not subject for flag operations.

* io.c (ARGF_FORWARD): should have specified argv explicitly,
  since we no longer have frame->argv saved.  [ruby-dev:24602]

* string.c (RESIZE_CAPA): check string attribute before modifying
  capacity member of string structure.  [ruby-dev:24594]

* ext/zlib/zlib.c (gzreader_gets): use memchr() to to gain
  performance.  [ruby-talk:117701]

* sprintf.c (rb_f_sprintf): raise ArgumentError for extra
  arguments, unless (digit)$ style used.

* io.c (rb_io_fptr_finalize): leave stdin/stdout/stderr open in
  interpreter termination.  [ruby-dev:24579]

* eval.c (frame_free): Guy Decoux solved the leak problem.
  Thanks.  [ruby-core:03549]


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@7121 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2004-10-27 09:29:26 +00:00
matz 1057902ac7 * io.c (read_all): block string buffer modification during
rb_io_fread() by freezing it temporarily. [ruby-dev:24479]

* dir.c (rb_push_glob): block call at once the end of method.
  [ruby-dev:24487]

* ext/enumerator/enumerator.c (enum_each_slice): remove
  rb_gc_force_recycle() to prevent potential SEGV.
  [ruby-dev:24499]

* ext/zlib/zlib.c (zstream_expand_buffer): hide internal string
  buffer by clearing klass.  [ruby-dev:24510]

* ext/socket/socket.c (sock_s_getservbyaname): protocol string
  might be altered.  [ruby-dev:24503]

* string.c (rb_str_upto): check if return value from succ is a
  string.  [ruby-dev:24504]

* io.c (rb_io_popen): get mode string via rb_io_flags_mode() to
  avoid mode string modification.  [ruby-dev:24454]

* io.c (rb_io_getline_fast): should take delim as unsigned char to
  distinguish EOF and '\377'.  [ruby-dev:24460]

* io.c (rb_io_getline): add check for RS modification.
  [ruby-dev:24461]

* enum.c (enum_sort_by): use qsort() directly instead using
  rb_iterate().  [ruby-dev:24462]

* enum.c (enum_each_with_index): remove rb_gc_force_recycle() to
  prevent access to recycled object (via continuation for
  example).  [ruby-dev:24463]


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@7071 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2004-10-19 10:25:23 +00:00
matz 30116ff8c2 * array.c (rb_ary_delete): comparison may change the capacity.
[ruby-dev:24348]

* array.c (rb_ary_fill): fill should honor length argument.
  [ruby-dev:24346]

* array.c (rb_ary_replace): should not use ptr from shared array.
  [ruby-dev:24345]

* ext/socket/socket.c (s_accept): don't retry for EWOULDBLOCK.
  [ruby-talk:113807]

* array.c (flatten): element size might change during comparison.
  [ruby-dev:24343]


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@6972 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2004-09-29 05:15:33 +00:00
usa 03f75020c9 ChangeLog
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@6896 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2004-09-13 01:22:16 +00:00
dave f7b9018390 Add documentation for Module#included
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@6839 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2004-08-30 14:23:19 +00:00
matz bc667633d0 * eval.c (rb_eval): copy on write for argument local variable
assignment.

* eval.c (assign): ditto.

* eval.c (rb_call0): update ruby_frame->argv with the default
  value used for the optional arguments.

* object.c (Init_Object): "===" calls rb_obj_equal() directly.
  [ruby-list:39937]


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@6703 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2004-07-27 08:11:36 +00:00
matz 9d1f9bd56b * eval.c (rb_mod_freeze): prepare string representation before
freezing. [ruby-talk:103646]


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@6469 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2004-06-16 14:21:34 +00:00
nobu 6a5e63a715 * object.c (rb_class_inherited_p): singleton class inherits Class
rather than its object's class.  [ruby-dev:23690]


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@6462 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2004-06-16 07:04:05 +00:00
matz 6a60393280 * range.c (range_each_func): terminates loop if generating value
is same to @end.  [ruby-talk:100269]

* string.c (rb_str_new4): should not reuse frozen shared string if
  the original is not an instance of String. [ruby-talk:100193]

* time.c (time_mdump): preserve GMT bit in the marshal data.
  [ruby-talk:100213]

* eval.c (is_defined): do not protect exception during receiver
  evaluation.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@6313 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2004-05-14 16:39:15 +00:00
matz 1b0f90ca33 * parse.y (string_content): turn off NODE_NEWLINE flag to avoid
unnecessary line trace for inlined expression.
  (ruby-bugs PR#1320)

* numeric.c (flo_to_s): tweak output string based to preserve
  decimal point and to remove trailing zeros.  [ruby-talk:97891]

* string.c (rb_str_index_m): use unsigned comparison for T_FIXNUM
  search.  [ruby-talk:97342]

* hash.c (rb_hash_equal): returns true if two hashes have same set
  of key-value set.  [ruby-talk:97559]

* hash.c (rb_hash_eql): returns true if two hashes are equal and
  have same default values.

* string.c (rb_str_equal): always returns true or false, never
  returns nil. [ruby-dev:23404]


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@6262 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2004-05-07 08:44:24 +00:00
nobu d952e33003 * array.c, enum.c, eval.c, file.c, io.c, numeric.c, object.c, prec.c,
process.c, re.c, string.c: typos in RDoc comments.  [ruby-core:02783]


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@6158 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2004-04-14 04:06:52 +00:00
matz 4f0ef242cc * object.c (rb_mod_cvar_get): new method Module#class_variable_get.
* object.c (rb_mod_cvar_set): ditto (Module#class_variable_set).

* eval.c (rb_thread_atfork): 1.9 warns no more for thread
  termination.  [ruby-dev:23212]


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@6005 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2004-03-23 19:14:16 +00:00
matz bfb47068b0 * eval.c: remove specialized version of rb_Array(). use simple
one defined in object.c.

* object.c (Init_Object): remove Kernel#to_a.

* enum.c (enum_zip): use "to_a" instead of "to_ary".


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@5968 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2004-03-18 06:59:04 +00:00
nobu b416c57c0a * eval.c (method_proc): return bound Proc object. [ruby-dev:22854]
* eval.c (rb_mod_define_method): bind method body itself for Method
  object.

* node.h (NODE_DMETHOD): deprecated.

* object.c (rb_class_inherited_p): export.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@5667 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2004-02-10 11:49:14 +00:00
nobu 509fa97431 * object.c (rb_obj_clone, rb_obj_dup): mentioned about
initialize_copy.  [ruby-core:02339]


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@5666 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2004-02-10 08:12:04 +00:00
matz 7df46a4493 * pack.c (num2i32): pack should not raise RangeError.
[ruby-dev:22654]

* pack.c (pack_pack): do not auto convert nil to zero.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@5542 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2004-01-22 18:06:38 +00:00
matz 22c005569b * variable.c (rb_set_class_path): do not set path if
* lib/cgi.rb (CGI::QueryExtension): give extended string, not a
  delegater object.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@5501 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2004-01-19 09:19:31 +00:00
nobu a7b1a2eced * class.c, error.c, file.c, io.c, numeric.c, object.c, re.c, struct.c,
time.c: marked init_copy functions nodoc.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@5492 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2004-01-18 14:16:47 +00:00
dave a1d3a8e861 Add explicit line breaks in method signatures for ri. Fixup some comments in object.c. Support changes comments for "in xxx.c"
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@5443 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2004-01-12 03:11:25 +00:00
matz b07337fcb3 * configure.in: install rdoc by default. if you do not want to
install rdoc, specify --disable-install-doc.

* eval.c (eval): need to add message delimiter. [ruby-dev:22561]

* defines.h (__NeXT__): Ensure that all standard S_IRUSR, S_IWGRP,
  S_IRWXO, etc. macros are defined since future code might require
  them (even though present code only requires a subset).

* defines.h (__NeXT__): Bug fix: WORDS_BIGENDIAN was not being set
  correctly on Rhapsody when -arch compiler flag was used (via
  configure's --enable-fat-binary option).

* ext/socket/socket.c (make_hostent): getaddrinfo(3) on BSD do not
  fill ai_canonname if serv is not supplied.  (ruby-bugs PR#1243)


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@5430 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2004-01-10 17:39:07 +00:00
eban 973c2ad00d * eval.c, object.c, process.c, re.c: don't use C++ style comments.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@5412 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2004-01-08 02:21:28 +00:00
dave 88c127c19b Finish documenting internal stuff. See Changelog for other details
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@5364 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2004-01-02 06:01:12 +00:00
dave 8d32798543 RDoc Struct and random
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@5340 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2003-12-28 20:47:56 +00:00
dave 3c288b427d Add RDoc documentation for stuff in object.c
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@5330 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2003-12-28 06:33:07 +00:00
dave d89650c8cf RDoc comments for Symbol
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@5317 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2003-12-27 06:09:08 +00:00
nobu 65fed5dad3 * class.c (rb_mod_init_copy): always copy singleton class.
[ruby-dev:22325]


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@5251 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2003-12-22 12:15:34 +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
dave da99e407fb Add file.c comments (and necessary support in parse_c.rb)
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@5234 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2003-12-21 07:28:54 +00:00
dave 5076ed519b Document Class and Dir
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@5222 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2003-12-19 15:18:09 +00:00