Commit graph

833 commits

Author SHA1 Message Date
matz
6e87a54aec * ruby.c (proc_options): removed "-*-" support for #! line.
* io.c (rb_io_s_sysopen): new method to get a raw file
  descriptor. [new]

* ext/socket/socket.c (tcp_sysaccept): new method to return an
  accepted socket fd (integer). [new]

* ext/socket/socket.c (unix_sysaccept,sock_sysaccept): ditto.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@2492 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2002-05-23 05:35:32 +00:00
nobu
ce3ea1911a 2002-05-22
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@2486 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2002-05-22 07:51:15 +00:00
matz
edbe98d848 * object.c (Init_Object): should do exact match for Module#==.
* compar.c (cmp_eq): returns 'false' if <=> returns 'nil'.

* compar.c (cmp_gt,cmp_ge,cmp_lt,cmp_le,cmp_between): ditto.

* pack.c (pack_pack): should propagate taintedness.

* pack.c (pack_unpack): ditto.

* eval.c (rb_thread_schedule): need to preserve errno before
  calling rb_trap_exec().

* regex.c (calculate_must_string): a bug in charset/charset_not
  parsing.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@2482 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2002-05-21 05:39:19 +00:00
nobu
077d92a044 2002-05-20
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@2474 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2002-05-20 04:39:50 +00:00
eban
d8a615ed3d 2002-05-16
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@2461 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2002-05-16 06:17:05 +00:00
eban
c5d6a1ba48 * gc.c (is_pointer_to_heap): avoid GCC 3.1 warnings.
* missing/strftime.c (timezone): it should take no argument on Cygwin.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@2454 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2002-05-14 05:59:35 +00:00
eban
caba4b3d94 2002-05-12
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@2448 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2002-05-11 19:32:59 +00:00
nobu
592f838016 2002-05-11
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@2446 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2002-05-11 13:21:57 +00:00
nobu
868d104b49 2002-05-10
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@2442 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2002-05-09 17:02:36 +00:00
eban
d303a22fcc 2002-05-07
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@2439 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2002-05-07 08:17:14 +00:00
knu
40225b8cb5 2002-05-05
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@2434 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2002-05-04 22:01:55 +00:00
knu
5c7b8af937 2002-05-04
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@2429 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2002-05-03 22:40:52 +00:00
eban
4213a33aa4 2002-05-02
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@2425 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2002-05-02 09:31:37 +00:00
eban
1d64100b2a 2002-05-01
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@2421 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2002-05-01 13:23:01 +00:00
nobu
b664645ddc * eval.c (rb_proc_new): make Proc from C function. [new]
* intern.h (rb_proc_new): prototype.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@2413 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2002-04-26 00:38:44 +00:00
nobu
67c8ca36f2 2002-04-25
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@2412 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2002-04-25 14:33:15 +00:00
matz
e3a8c62630 * io.c (rb_io_mode_flags): both 'r+b' and 'rb+' should be allowed.
* io.c (rb_io_mode_modenum): ditto.

* gc.c (rb_memerror): rename from mem_error, and exported.

* gc.c (Init_GC): pre-allocate NoMemoryError instance.

* object.c (convert_type): error message changed from "failed to
  convert" to "cannot convert", since it does not try to convert
  if an object does not respond to the converting method.

* eval.c (block_pass): convert Method to Proc using
  rb_check_convert_type().

* object.c (rb_check_convert_type): always convert T_DATA

* eval.c (rb_thread_cleanup): should not terminate main_thread by
  Fatal error.

* regex.c (is_in_list): need to not exclude NUL and NEWLINE.

* re.c (rb_reg_expr_str): wrong backslash escapement.

* re.c (rb_reg_expr_str): do not escape embedded space
  characters.

* marshal.c (w_object): T_DATA process patch from Joel VanderWerf
  <vjoel@PATH.Berkeley.EDU>.  This is temporary hack; it remains
  undocumented, and it will be removed when marshaling is
  re-designed.

* marshal.c (r_object): ditto.

* numeric.c (num_step): Integer#step is moved to Numeric#step;
  Fixnum#step is merged into this method.

* numeric.c (int_dotimes): Fixnum#times is merged.

* numeric.c (int_upto): Fixnum#upto is merged.

* numeric.c (int_downto): Fixnum#downto is merged.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@2401 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2002-04-24 04:54:16 +00:00
nobu
b596fbbc37 * ext/stringio/stringio.c (strio_mark): must check if ptr is NULL
first.  [ruby-talk:38873]

* lib/mkmf.rb (create_makefile): should print depend file when
  make is other than nmake.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@2399 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2002-04-23 16:22:25 +00:00
eban
c46d1cdb1e 2002-04-19
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@2388 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2002-04-19 07:30:30 +00:00
nobu
9021157411 2002-04-18
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@2383 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2002-04-18 09:10:54 +00:00
nobu
23288f8674 * eval.c (assign): convert mrhs to mvalue.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@2377 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2002-04-16 00:02:49 +00:00
nobu
7edb39fbfa 2002-04-15
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@2376 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2002-04-15 09:29:47 +00:00
nobu
b289435872 2002-04-12
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@2369 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2002-04-12 03:32:52 +00:00
eban
2628f376c9 2002-04-11
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@2364 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2002-04-11 10:06:01 +00:00
matz
19c42c0740 * variable.c (rb_obj_remove_instance_variable): raise NameError if
specified instance variable is not defined.

* variable.c (generic_ivar_remove): modified to check ivar
  existence.

* file.c (rb_file_s_extname): new method based on the proposal
  (and patch) from Mike Hall. [new]

* eval.c (error_handle): default to 1 unless status is set.

* eval.c (ruby_options): guard error_handle() with PROT_NONE.

* eval.c (ruby_stop): ditto.

* math.c (math_acosh): added. [new]

* math.c (math_asinh): ditto.

* math.c (math_atanh): ditto.

* struct.c (rb_struct_each_pair): method added. [new]

* class.c (rb_singleton_class): wrong condition; was creating
  unnecessary singleton class.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@2348 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2002-04-10 08:45:26 +00:00
nobu
e223518948 * ext/stringio/stringio.c (check_modifiable): performance
improvement.  avoid calling rb_str_modify() twice.

* ext/stringio/stringio.c (strio_ungetc): ditto.

* ext/stringio/stringio.c (strio_putc): ditto.

* ext/stringio/stringio.c (strio_write): ditto, and use
  rb_str_cat() as possible.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@2345 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2002-04-09 03:52:39 +00:00
nobu
2a255514a1 2002-04-08
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@2343 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2002-04-08 07:09:58 +00:00
nobu
07e54ed140 2002-04-04
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@2335 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2002-04-04 09:22:13 +00:00
nobu
64b6406445 2002-04-02
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@2321 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2002-04-02 08:52:55 +00:00
nobu
360453ce14 2002-04-01
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@2315 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2002-04-01 08:07:10 +00:00
nobu
bf1f97ae3f 2002-03-29
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@2305 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2002-03-29 09:04:05 +00:00
matz
cf06d8b20b * io.c (rb_io_sysseek): new method based on a patch from Aristarkh
A Zagorodnikov <xm@bolotov-team.ru>. [new]

* io.c (READ_DATA_PENDING): use !feof(fp) for default behavior.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@2294 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2002-03-27 05:28:00 +00:00
matz
f60b87038d * parse.y (primary): while/until statement modifiers to "begin"
statement now work as "do .. while" even when begin statement
  has "rescue" or "ensure" [new].

* parse.y (bodystmt): rescue/ensure is allowed at every bodies,
  i.e. method bodies, begin bodies, class bodies[new], and module
  bodies[new].

* ext/socket/socket.c (sock_addrinfo): should specify ai_socktype
  for getaddrinfo hints.

* eval.c (rb_f_abort): embed aborting message into exception
  object [new].

* eval.c (terminate_process): utility function for exit and abort.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@2285 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2002-03-26 06:18:51 +00:00
eban
0f95eb4659 2002-03-25
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@2272 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2002-03-25 06:21:24 +00:00
usa
258725716b 2002-03-22
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@2262 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2002-03-22 07:45:23 +00:00
nobu
f596cfc1d9 2002-03-20
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@2231 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2002-03-20 10:31:37 +00:00
matz
6d2e56ce7c * re.c (rb_reg_search): should clear last_match if pos is out of
string range.

* string.c (rb_str_index_m): ditto.

* string.c (rb_str_rindex): ditto.

* class.c (rb_define_class): should handle autoload.

* class.c (rb_define_module): ditto.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@2225 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2002-03-19 09:03:11 +00:00
nobu
22270b6d4b * parse.y (parse_string): part of multi-byte sequence must not
match to paren.

* parse.y (parse_qstring): ditto.

* parse.y (parse_quotedwords): ditto.

* parse.y (str_extend): handle multi-byte characters.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@2218 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2002-03-18 02:04:23 +00:00
eban
b400afbc5b 2002-03-15
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@2209 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2002-03-15 08:59:43 +00:00
nobu
e4f4b0c87c 2002-03-14
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@2195 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2002-03-14 00:01:04 +00:00
nobu
d5938dd1c4 2002-03-13
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@2192 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2002-03-13 12:05:49 +00:00
nobu
8b6ad9131e 2002-03-12
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@2188 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2002-03-12 09:47:29 +00:00
nobu
7ff805d46b 2002-03-11
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@2177 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2002-03-11 12:47:19 +00:00
eban
301fec6ac9 2002-03-08
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@2170 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2002-03-08 07:11:56 +00:00
nobu
effd8230ea * gc.c (rb_source_filename): added. holds unique strings for file
names with GC space.

* gc.c (rb_gc_mark): mark source file name.

* gc.c (gc_sweep): ditto.

* gc.c (Init_GC): initialize source file name table.

* intern.h (rb_source_filename): added.

* eval.c (rb_eval_string): use rb_source_filename().

* parse.y (yycompile): ditto.

* ruby.c (proc_options): ditto.

* ruby.c (load_file): ditto.

* ruby.c (ruby_script): ditto.

* ruby.c (ruby_prog_init): ditto.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@2166 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2002-03-07 11:19:37 +00:00
eban
6dc931e59f * dln.c (dln_load): use LoadLibrary instead of LoadLibraryEx.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@2165 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2002-03-06 09:00:32 +00:00
eban
6012f4faf3 2002-03-01
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@2155 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2002-03-01 02:38:46 +00:00
eban
bf7037833d 2002-02-28
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@2148 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2002-02-28 13:12:14 +00:00
eban
2fcd221fec * io.c (READ_DATA_PENDING): uClibc support.
* random.c (rand_init): ditto.
* ext/socket/{addinfo.h,getaddrinfo.c} (gai_strerror): ditto.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@2143 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2002-02-27 04:30:20 +00:00
usa
9b137dcb90 2002-02-26
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@2141 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2002-02-26 12:38:05 +00:00