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

129 Коммитов

Автор SHA1 Сообщение Дата
akr b9e0294eda fix typos.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@25635 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-11-03 17:46:28 +00:00
nobu f517fb54c7 * pack.c (NATINT_LEN, pack_pack): suppressed warnings.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@25229 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-10-04 06:00:33 +00:00
nobu d1abc53721 * array.c, bignum.c, dln.c, error.c, gc.c, io.c, marshal.c,
numeric.c, pack.c, strftime.c, string.c, thread.c, transcode.c,
  transcode_data.h, util.c, variable.c, vm_dump.c,
  include/ruby/encoding.h, missing/crypt.c, missing/vsnprintf.c:
  suppress VC type warnings.  [ruby-core:22726]


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@22914 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-03-12 09:16:15 +00:00
matz d5c7938eb4 * pack.c (pack_pack): replace all rb_Float() to rb_to_float().
[ruby-dev:37663]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@21206 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-12-30 16:10:23 +00:00
matz ad00464489 * pack.c (pack_pack): template f should not accept non float
values.  [ruby-dev:37656]

* object.c (rb_to_float): new function to type check floats.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@21179 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-12-29 13:40:33 +00:00
matz 9f8c309d6e * pack.c (pack_pack): encoding of packed string only from 'm',
'M', and 'u' should be US-ASCII.  [ruby-dev:37284]

* pack.c (pack_pack): encoding of packed string only from 'U'
  should be UTF-8.  also upgrade US-ASCII strings to UTF-8.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@20956 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-12-23 15:30:05 +00:00
yugui e41fb7d4ae * pack.c (pack_pck): fixed [ruby-dev:37295].
Array#pack always has returned an US-ASCII string when
  the given format ended with 'u', 'M' or 'm'.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@20588 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-12-09 02:51:10 +00:00
yugui 0945f41a5f * pack.c (pack_pack): fixed odd act of 'm*', 'M*', and 'P*'.
just ignores '*' in these cases.
  [ruby-dev:37289]


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@20581 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-12-08 14:41:44 +00:00
nobu 92e0f99d37 * pack.c (pack_pack): fixed length for odd length string.
[ruby-dev:37283]


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@20580 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-12-08 09:31:44 +00:00
yugui 4b983b90c4 * pack.c (pack_pack): 'u0' is not special differently from 'm0'.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@20564 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-12-06 08:55:57 +00:00
naruse 343deb4c39 * pack.c (pack_pack): set US-ASCII and CODERANGE_7BIT
when quoted-printable ('M') and base64 ('m').
  [ruby-dev:37284]

* pack.c (pack_unpack): ditto.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@20563 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-12-06 05:37:20 +00:00
matz 408ca7cbb1 * pack.c (pack_pack): propagate taint status from format string to
result string.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@20524 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-12-04 16:20:02 +00:00
matz 93fa4cbf3d * pack.c (pack_pack): templates a, A, Z should propagate encoding
of original strings.  templates b, B, h, H brings ASCII-8BIT to
  the result.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@20057 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-10-30 09:19:13 +00:00
nobu 34c5cea9b5 * pack.c (pack_pack): set encoding from packing string and UTF-8 for
"U".  [ruby-core:19590]


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@20021 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-10-29 07:41:21 +00:00
mame 2c1c462747 * pack.c (pack_pack, pack_unpack): 'm0' format (base64) complies with
RFC 4648.  It adds no line feed when encoding, and raise ArgumentError
  if the encoded string contains non-alphabet (including CR and LF).

* lib/base64.rb: added.  This provides encoding/decoding method for
  Base64 in standard RFC 2045, Base64 in standard RFC 4648 and ``Base 64
  Encoding with URL and Filename SafeAlphabet'' in RFC 4648.

* test_pack.c, test/base64/test_base64.rb: add tests for above.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@19553 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-09-25 12:24:54 +00:00
matz 31b6ea65bb * include/ruby/ruby.h (DBL2NUM): renamed from DOUBLE2NUM.
a patch from Tadashi Saito <shiba at mail2.accsnet.ne.jp>
  in [ruby-dev:36102].

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@19160 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-09-05 18:24:21 +00:00
akr 40c771fd45 * pack.c (encodes): make buff fixed length to avoid SEGV by
ruby -e '["a"*10000000].pack("m1000000000")'


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@19139 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-09-04 15:06:34 +00:00
nobu 1c30bc4cca * pack.c (pack_unpack): upper half of hexdigits has never been used.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@18288 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-07-31 03:23:55 +00:00
nobu e7207d0404 * pack.c (pack_unpack): reduced static variables.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@18273 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-07-30 15:58:36 +00:00
mame df5604ce5d * pack.c (pack_unpack): fix v and V with big endian.
[1].pack("V").unpack("V") was [4294967296].


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@18106 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-07-17 11:42:17 +00:00
mame 871c83dddf * pack.c (pack_pack): fix i! with big endian. [1].pack("i!") was
"\0\0\0\0".


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@18105 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-07-17 11:36:54 +00:00
ko1 72ba13aa8e * array.c, bignum.c, cont.c, dir.c, dln.c, encoding.c, enumerator.c,
enumerator.c (enumerator_allocate), eval_jump.c, file.c, hash.c,
  io.c, load.c, pack.c, proc.c, random.c, re.c, ruby.c, st.c,
  string.c, thread.c, thread_pthread.c, time.c, util.c, variable.c,
  vm.c, gc.c:
  allocated memory objects by xmalloc (ruby_xmalloc) should be
  freed by xfree (ruby_xfree).
* ext/curses/curses.c, ext/dbm/dbm.c, ext/digest/digest.c,
  ext/gdbm/gdbm.c, ext/json/ext/parser/parser.c,
  ext/json/ext/parser/unicode.c, ext/openssl/ossl_cipher.c,
  ext/openssl/ossl_hmac.c, ext/openssl/ossl_pkey_ec.c,
  ext/sdbm/init.c, ext/strscan/strscan.c, ext/zlib/zlib.c:
  ditto.



git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@17017 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-06-08 10:01:40 +00:00
nobu 075530a685 * suppress warnings with -Wwrite-string.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@16716 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-05-31 09:28:20 +00:00
mame a0e236f606 * pack.c (pack_pack): check errno to detect error of ruby_strtoul.
* pack.c (pack_unpack): ditto.

* test/ruby/test_pack.rb: add a test for above.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@16452 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-05-17 17:56:41 +00:00
nobu 89c408704b * enumerator.c (enumerator_each, enumerator_with_index): suppress
warnings.

* pack.c (pack_unpack): ditto.

* process.c (rb_syswait): ditto.

* re.c (rb_reg_prepare_enc, rb_reg_prepare_re,
  rb_reg_adjust_startpos): ditto.

* regparse.c (onig_name_to_group_numbers): ditto.

* missing/vsnprintf.c (BSD_vfprintf): ditto.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@16156 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-04-22 13:49:43 +00:00
akr 6cdef2dc7e * $Date$ keyword removed to avoid inclusion of locale dependent
string.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@14912 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-01-06 15:49:38 +00:00
akr 0352d32f05 * util.c (ruby_strtoul): locale independent strtoul is implemented to
avoid "i".to_i(36) cause 0 under tr_TR locale.
  This is newly implemented, not a copy of missing/strtoul.c.

* include/ruby/ruby.h (ruby_strtoul): declared.
  (STRTOUL): defined to use ruby_strtoul.

* bignum.c, pack.c, ext/socket/socket.c: use STRTOUL.

* configure.in (strtoul): don't check.

* missing/strtoul.c: removed.

* include/ruby/missing.h (strtoul): removed.

* common.mk (strtoul.o): removed.

* LEGAL (missing/strtoul.c): removed.



git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@14850 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-01-02 06:24:27 +00:00
usa e3215a7342 * pack.c (pack_pack): use NUM2LONG instead of NUM2INT.
* numeric.c (fix_lshift, fix_aref): use SIZEOF_LONG instead of
	  SIZEOF_VALUE.

	* bignum.c (big2ulong, rb_big_aref): ditto.



git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@14625 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2007-12-24 18:12:24 +00:00
duerst 1b79b5be82 Thu Dec 20 17:15:15 2007 Martin Duerst <duerst@it.aoyama.ac.jp>
* pack.c: Slight change to documentation ('character' ->
	  'byte (C char)'). [ruby-core:13126], see also [ruby-core:13998].



git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@14359 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2007-12-20 08:16:43 +00:00
matz 65a30eb3e7 * pack.c (pack_pack): RDoc update. a patch from Gary Wright
<radar2002 AT gmail.com>.  [ruby-core:13998]

* pack.c (pack_unpack): ditto.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@14196 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2007-12-11 14:05:34 +00:00
akr 7ff702406a * include/ruby/intern.h (rb_uv_to_utf8): declared.
* re.c (rb_reg_preprocess): new function for dynamic regexp with
  \u{} such as Regexp.new("\\u{6666}").
  (rb_reg_prepare_re): preprocess regexp for recompiling.
  (read_escaped_byte): new function.
  (unescape_escaped_nonascii): new function.
  (append_utf8): new function.
  (unescape_unicode_list): new function.
  (unescape_unicode_bmp): new function.
  (unescape_nonascii): new function.
  (rb_reg_initialize): preprocess regexp.

* pack.c (rb_uv_to_utf8): renamed from uv_to_utf8.

* parse.y (STR_NEW3): take func instead of has8 and hasmb.
  (parser_str_new): use default coderange mechanism except for regexp.
  (parser_tokadd_utf8): copy regexp source as-is.
  (parser_read_escape): UTF-8 stuff removed.
  (parser_tokadd_escape): has8bit and hasmb removed.
  (parser_tokadd_string): fix 8-bit single byte character with \u.
  (parser_parse_string): has8bit and hasmb removed.
  (parser_here_document): has8bit and hasmb removed.
  (parser_yylex): call parser_tokadd_utf8 instead of read_escape for
  UTF-8 character.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@14072 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2007-12-01 16:56:19 +00:00
ko1 25c0cb981a * include/ruby/ruby.h: introduce 2 macros:
RFLOAT_VALUE(v), DOUBLE2NUM(dbl).
  Rename RFloat#value -> RFloat#double_value.
  Do not touch RFloat#double_value directly.
* bignum.c, insns.def, marshal.c, math.c, numeric.c, object.c,
  pack.c, parse.y, process.c, random.c, sprintf.c, string.c,
  time.c: apply above changes.
* ext/dl/mkcallback.rb, ext/json/ext/generator/generator.c:
  ditto.



git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@13913 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2007-11-13 16:00:53 +00:00
matz a25fbe3b3e * encoding.c: provide basic features for M17N.
* parse.y: encoding aware parsing.

* parse.y (pragma_encoding): encoding specification pragma.

* parse.y (rb_intern3): encoding specified symbols.

* string.c (rb_str_length): length based on characters.  
  for older behavior, bytesize method added.

* string.c (rb_str_index_m): index based on characters.  rindex as
  well.

* string.c (succ_char): encoding aware succeeding string.

* string.c (rb_str_reverse): reverse based on characters.

* string.c (rb_str_inspect): encoding aware string description.

* string.c (rb_str_upcase_bang): encoding aware case conversion.
  downcase, capitalize, swapcase as well.

* string.c (rb_str_tr_bang): tr based on characters.  delete,
  squeeze, tr_s, count as well.

* string.c (rb_str_split_m): split based on characters.

* string.c (rb_str_each_line): encoding aware each_line.

* string.c (rb_str_each_char): added.  iteration based on
  characters.

* string.c (rb_str_strip_bang): encoding aware whitespace
  stripping.  lstrip, rstrip as well.

* string.c (rb_str_justify): encoding aware justifying (ljust,
  rjust, center).

* string.c (str_encoding): get encoding attribute from a string. 

* re.c (rb_reg_initialize): encoding aware regular expression

* sprintf.c (rb_str_format): formatting (i.e. length count) based
  on characters.

* io.c (rb_io_getc): getc to return one-character string.
  for older behavior, getbyte method added.

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

* io.c (rb_io_ungetc): allow pushing arbitrary string at the
  current reading point.

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

* ext/strscan/strscan.c: encoding support.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@13261 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2007-08-25 03:29:39 +00:00
nobu 2b592580bf * include/ruby: moved public headers.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@12501 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2007-06-10 03:06:15 +00:00
nobu 194a01a484 * compile.c: fixed indentation.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@12434 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2007-06-05 04:49:54 +00:00
nobu 99d65b14b4 * compile.c, dir.c, eval.c, eval_jump.h, eval_method.h, numeric.c,
pack.c, parse.y, re.c, thread.c, vm.c, vm_dump.c, call_cfunc.ci,
  thread_pthread.ci, thread_win32.ci: fixed indentation.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@12431 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2007-06-05 04:25:10 +00:00
shyouhei 7f005938cf * pack.c (pack_unpack): properly ignore non-base64 octets such as
UTF-8 encoded BOMs; submitted by SOUMA Yutaka <holon@radastery.jp>
  to fix [ruby-core:10437]


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@11935 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2007-02-28 11:55:19 +00:00
matz eb68fb0c58 * pack.c (pack_unpack): execute block if given with unpacked value
instead of creating an array.  an idea from Tim Bray.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@11175 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2006-10-15 22:57:37 +00:00
matz 2156870525 * ruby.h (struct RArray): embed small arrays.
(RARRAY_LEN): defined for accessing array members.
  (RARRAY_PTR): ditto.

* array.c: use RARRAY_LEN and RARRAY_PTR.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@10833 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2006-09-02 14:42:08 +00:00
matz 54af80844f * ruby.h (struct RString): embed small strings.
(RSTRING_LEN): defined for accessing string members.
  (RSTRING_PTR): ditto.

* string.c: use RSTRING_LEN and RSTRING_PTR.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@10810 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2006-08-31 10:47:44 +00:00
nobu 9b4a611547 * pack.c (pack_pack): check argument overrun for 'P'. based on a
patch by rucila <rucila at yahoo.cojp>.  fixed: [ruby-dev:29182]


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@10660 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2006-08-04 04:58:25 +00:00
matz df80a7b4bb * pack.c (pack_unpack): propagate association array to copied
string.  [ruby-core:08223]

* pack.c (pack_unpack): return referenced string itself if it has
  same length as specified.  a patch from <nobu at ruby-lang.org>
  in [ruby-core:08225].

* pack.c (pack_pack): taint 'p' packed strings.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@10558 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2006-07-18 07:02:35 +00:00
matz 13556ea5ee * ext/io/wait/wait.c (io_ready_p): protoize.
* pack.c (define_swapx): should not use plain malloc.

* ext/curses/curses.c (curses_getmouse): ditto.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@10546 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2006-07-17 13:59:09 +00:00
matz 9b383bd6cf * sprintf.c (rb_str_format): allow %c to print one character
string (e.g. ?x).

* lib/tempfile.rb (Tempfile::make_tmpname): put dot between
  basename and pid.  [ruby-talk:196272]
* parse.y (do_block): remove -> style block.

* parse.y (parser_yylex): remove tLAMBDA_ARG.

* eval.c (rb_call0): binding for the return event hook should have
  consistent scope.  [ruby-core:07928]

* eval.c (proc_invoke): return behavior should depend whether it
  is surrounded by a lambda or a mere block.

* eval.c (formal_assign): handles post splat arguments.

* eval.c (rb_call0): ditto.

* st.c (strhash): use FNV-1a hash.

* parse.y (parser_yylex): removed experimental ';;' terminator.

* eval.c (rb_node_arity): should be aware of post splat arguments.

* eval.c (rb_proc_arity): ditto.

* parse.y (f_args): syntax rule enhanced to support arguments
  after the splat.

* parse.y (block_param): ditto for block parameters.

* parse.y (f_post_arg): mandatory formal arguments after the splat
  argument.

* parse.y (new_args_gen): generate nodes for mandatory formal
  arguments after the splat argument.

* eval.c (rb_eval): dispatch mandatory formal arguments after the
  splat argument.

* parse.y (args): allow more than one splat in the argument list.

* parse.y (method_call): allow aref [] to accept all kind of
  method argument, including assocs, splat, and block argument.

* eval.c (SETUP_ARGS0): prepare block argument as well.

* lib/mathn.rb (Integer): remove Integer#gcd2. [ruby-core:07931]

* eval.c (error_line): print receivers true/false/nil specially.

* eval.c (rb_proc_yield): handles parameters in yield semantics.

* eval.c (nil_yield): gives LocalJumpError to denote no block
  error.

* io.c (rb_io_getc): now takes one-character string.

* string.c (rb_str_hash): use FNV-1a hash from Fowler/Noll/Vo
  hashing algorithm.

* string.c (rb_str_aref): str[0] now returns 1 character string,
  instead of a fixnum.	[Ruby2]

* parse.y (parser_yylex): ?c now returns 1 character string,
  instead of a fixnum.	[Ruby2]

* string.c (rb_str_aset): no longer support fixnum insertion.

* eval.c (umethod_bind): should not update original class.
  [ruby-dev:28636]

* eval.c (ev_const_get): should support constant access from
  within instance_eval().  [ruby-dev:28327]

* time.c (time_timeval): should round for usec floating
  number.  [ruby-core:07896]

* time.c (time_add): ditto.

* dir.c (sys_warning): should not call a vararg function
  rb_sys_warning() indirectly.	[ruby-core:07886]

* numeric.c (flo_divmod): the first element of Float#divmod should
  be an integer. [ruby-dev:28589]

* test/ruby/test_float.rb: add tests for divmod, div, modulo and remainder.

* re.c (rb_reg_initialize): should not allow modifying literal
  regexps.  frozen check moved from rb_reg_initialize_m as well.

* re.c (rb_reg_initialize): should not modify untainted objects in
  safe levels higher than 3.

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

* dir.c (dir_close): should not close untainted dir stream.

* dir.c (GetDIR): add tainted/frozen check for each dir operation.

* lib/rdoc/parsers/parse_rb.rb (RDoc::RubyParser::parse_symbol_arg):
  typo fixed.  a patch from Florian Gross <florg at florg.net>.

* eval.c (EXEC_EVENT_HOOK): trace_func may remove itself from
  event_hooks.	no guarantee for arbitrary hook deletion.
  [ruby-dev:28632]

* util.c (ruby_strtod): differ addition to minimize error.
  [ruby-dev:28619]

* util.c (ruby_strtod): should not raise ERANGE when the input
  string does not have any digits.  [ruby-dev:28629]

* eval.c (proc_invoke): should restore old ruby_frame->block.
  thanks to ts <decoux at moulon.inra.fr>.  [ruby-core:07833]
  also fix [ruby-dev:28614] as well.

* signal.c (trap): sig should be less then NSIG.  Coverity found
  this bug.  a patch from Kevin Tew <tewk at tewk.com>.
  [ruby-core:07823]

* math.c (math_log2): add new method inspired by
  [ruby-talk:191237].

* math.c (math_log): add optional base argument to Math::log().
  [ruby-talk:191308]

* ext/syck/emitter.c (syck_scan_scalar): avoid accessing
  uninitialized array element.	a patch from Pat Eyler
  <rubypate at gmail.com>.  [ruby-core:07809]

* array.c (rb_ary_fill): initialize local variables first.  a
  patch from Pat Eyler <rubypate at gmail.com>.	 [ruby-core:07810]

* ext/syck/yaml2byte.c (syck_yaml2byte_handler): need to free
  type_tag.  a patch from Pat Eyler <rubypate at gmail.com>.
  [ruby-core:07808]

* ext/socket/socket.c (make_hostent_internal): accept ai_family
  check from Sam Roberts <sroberts at uniserve.com>.
  [ruby-core:07691]

* util.c (ruby_strtod): should not cut off 18 digits for no
  reason.  [ruby-core:07796]

* array.c (rb_ary_fill): internalize local variable "beg" to
  pacify Coverity.  [ruby-core:07770]

* pack.c (pack_unpack): now supports CRLF newlines.  a patch from
  <tommy at tmtm.org>.	[ruby-dev:28601]

* applied code clean-up patch from Stefan Huehner
  <stefan at huehner.org>.  [ruby-core:07764]

* lib/jcode.rb (String::tr_s): should have translated non
  squeezing character sequence (i.e. a character) as well.  thanks
  to Hiroshi Ichikawa <gimite at gimite.ddo.jp> [ruby-list:42090]

* ext/socket/socket.c: document update patch from Sam Roberts
  <sroberts at uniserve.com>.  [ruby-core:07701]

* lib/mathn.rb (Integer): need not to remove gcd2.  a patch from
  NARUSE, Yui <naruse at airemix.com>.	[ruby-dev:28570]

* parse.y (arg): too much NEW_LIST()

* eval.c (SETUP_ARGS0): remove unnecessary access to nd_alen.

* eval.c (rb_eval): use ARGSCAT for NODE_OP_ASGN1.
  [ruby-dev:28585]

* parse.y (arg): use NODE_ARGSCAT for placeholder.

* lib/getoptlong.rb (GetoptLong::get): RDoc update patch from
  mathew <meta at pobox.com>.  [ruby-core:07738]

* variable.c (rb_const_set): raise error when no target klass is
  supplied.  [ruby-dev:28582]

* prec.c (prec_prec_f): documentation patch from
  <gerardo.santana at gmail.com>.  [ruby-core:07689]

* bignum.c (rb_big_pow): second operand may be too big even if
  it's a Fixnum.  [ruby-talk:187984]

* README.EXT: update symbol description.  [ruby-talk:188104]

* COPYING: explicitly note GPLv2.  [ruby-talk:187922]

* parse.y: remove some obsolete syntax rules (unparenthesized
  method calls in argument list).

* eval.c (rb_call0): insecure calling should be checked for non
  NODE_SCOPE method invocations too.

* eval.c (rb_alias): should preserve the current safe level as
  well as method definition.

* process.c (rb_f_sleep): remove RDoc description about SIGALRM
  which is not valid on the current implementation. [ruby-dev:28464]

 Thu Mar 23 21:40:47 2006  K.Kosako  <sndgk393 AT ybb.ne.jp>

* eval.c (method_missing): should support argument splat in
  super.  a bug in combination of super, splat and
  method_missing.  [ruby-talk:185438]

* configure.in: Solaris SunPro compiler -rapth patch from
  <kuwa at labs.fujitsu.com>.  [ruby-dev:28443]

* configure.in: remove enable_rpath=no for Solaris.
  [ruby-dev:28440]

* ext/win32ole/win32ole.c (ole_val2olevariantdata): change behavior
  of converting  OLE Variant object with VT_ARRAY|VT_UI1 and Ruby
  String object.

* ruby.1: a clarification patch from David Lutterkort
  <dlutter at redhat.com>.  [ruby-core:7508]

* lib/rdoc/ri/ri_paths.rb (RI::Paths): adding paths from rubygems
  directories.	a patch from Eric Hodel <drbrain at segment7.net>.
  [ruby-core:07423]

* eval.c (rb_clear_cache_by_class): clearing wrong cache.

* ext/extmk.rb: use :remove_destination to install extension libraries
  to avoid SEGV.  [ruby-dev:28417]

* eval.c (rb_thread_fd_writable): should not re-schedule output
  from KILLED thread (must be error printing).

* array.c (rb_ary_flatten_bang): allow specifying recursion
  level.  [ruby-talk:182170]

* array.c (rb_ary_flatten): ditto.

* gc.c (add_heap): a heap_slots may overflow.  a patch from Stefan
  Weil <weil at mail.berlios.de>.

* eval.c (rb_call): use separate cache for fcall/vcall
  invocation.

* eval.c (rb_eval): NODE_FCALL, NODE_VCALL can call local
  functions.

* eval.c (rb_mod_local): a new method to specify newly added
  visibility "local".

* eval.c (search_method): search for local methods which are
  visible only from the current class.

* class.c (rb_class_local_methods): a method to list local methods.

* object.c (Init_Object): add BasicObject class as a top level
  BlankSlate class.

* ruby.h (SYM2ID): should not cast to signed long.
  [ruby-core:07414]

* class.c (rb_include_module): allow module duplication.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@10235 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2006-06-09 21:20:17 +00:00
ocean 2b25baff72 * dir.c: supress warning "/* within comment"
* bignum.c, io.c, math.c, pack.c, time.c: ANSI styled.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@10008 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2006-03-01 10:06:03 +00:00
ocean d0a3c64fb4 * util.c (ruby_strtod): Float("1e") should fail. [ruby-core:7330]
* pack.c (EXTEND32): unpack("l") did not work where sizeof(long) != 4.
  [ruby-talk:180024]

* pack.c (pack_unpack): fixed integer overflow on template "w".
  [ruby-talk:180126]


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@9947 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2006-02-17 02:21:39 +00:00
nobu 0ccc5dbe83 * io.c, pack.c, ext/syck/rubyext.c, ext/syck/syck.h, missing/isinf.c:
get rid of warnings.  fixed: [ruby-core:06247]


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@9383 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2005-10-13 14:30:54 +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
akr 0517b43c5b banish some warnings.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@9292 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2005-09-24 00:17:43 +00:00
ocean 08c1738c51 * bignum.c: changed `foo _((boo))' to `foo(boo)`. [ruby-dev:27056]
* defines.h, dir.c, dln.h, enumerator.c, env.h, error.c, eval.c, file.c,
  gc.c, hash.c, inits.c, intern.h, io.c, lex.c, marshal.c, missing.h,
  node.h, numeric.c, pack.c, process.c, re.h, ruby.c, ruby.h, rubyio.h,
  rubysig.h, signal.c, sprintf.c, st.h, string.c, struct.c, time.c,
  util.c, util.h, variable.c: ditto.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@9155 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2005-09-14 06:32:32 +00:00