1
0
Fork 0
mirror of https://github.com/ruby/ruby.git synced 2022-11-09 12:17:21 -05:00
Commit graph

16 commits

Author SHA1 Message Date
nobu
54524ed8f0 * ext/iconv/iconv.c (map_charset): always ensure code is a String.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@5252 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2003-12-22 12:59:28 +00:00
nobu
faab8f264d * configure.in (ieeefp.h), numeric.c: needed for finite() on
Solaris.  [ruby-core:01921]

* file.c (rb_stat_inspect): adjust format specifier.

* parse.c (arg_prepend): nodetype() is for debug use.

* ruby.h (ISASCII, etc): cast to int to get rid of warning.

* ruby.h (alloca.h): include even in GCC.  [ruby-core:01925]

* ext/bigdecimal/bigdecimal.c (GetVpValue): adjust format
  specifier.

* ext/bigdecimal/bigdecimal.c (BigDecimal_prec, BigDecimal_coerce,
  BigDecimal_divmod): use rb_assoc_new() to suppress memory usage.

* ext/bigdecimal/bigdecimal.c (BigDecimal_split): ditto.

* ext/dl/sym.c (rb_dlsym_guardcall): guard itself should be
  volatile.

* ext/iconv/iconv.c (iconv_convert): ensure actual parameter with
  format specifier.

* ext/pty/pty.c (MasterDevice, SlaveDevice, deviceNo): do not
  define unless used.

* ext/pty/pty.c (getDevice): get rid of warning.

* ext/socket/socket.c (port_str, sock_s_getaddrinfo,
  sock_s_getnameinfo): FIX2INT() now returns long.

* ext/socket/socket.c (init_inetsock_internal): uninitialized
  variable.

* ext/syck/rubyext.c (syck_parser_assign_io): add prototype.

* ext/syck/rubyext.c (rb_syck_mktime, yaml_org_handler): use
  ISDIGIT() instead of isdigit() to avoid warnings and for
  platforms which don't support non-ascii charater.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@5163 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2003-12-11 02:39:59 +00:00
matz
f449c04a36 * io.c (read_all): should return given string even if data read is
empty.  [ruby-dev:22207]


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@5159 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2003-12-10 08:26:36 +00:00
akr
c4d502c931 * ext/iconv/iconv.c (map_charset): make case sensitive.
ext/iconv/charset_alias.rb (charset_alias): don't ignore
  config.charset's information.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@5130 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2003-12-07 11:39:29 +00:00
nobu
4d5204c990 * ext/iconv/iconv.c (iconv_failure_initialize): conform with
orthodox initialization method.

* ext/iconv/iconv.c (iconv_fail): initialize exception instance
  from the class, and do not share instance variables with the
  others.  [ruby-dev:21470]


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@4654 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2003-10-02 11:33:52 +00:00
nobu
a70a430f83 * ext/iconv/iconv.c (iconv_fail): now yield erred substring, and
set error object to $!.

* ext/iconv/iconv.c (iconv_convert): error handler block should
  return appended part and the rest.  if rest is nil, the
  conversion stops.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@4650 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2003-10-02 05:19:18 +00:00
nobu
26fcfd1bb5 * ext/iconv/iconv.c (map_charset): use lower case keys.
* ext/iconv/iconv.c (iconv_fail): just yield error and return the
  result if a block is given.

* ext/iconv/iconv.c (iconv_convert): yield error and append the
  result if a block is given.

* ext/iconv/charset_alias.rb (charset_alias): optional third
  argument.

* ext/iconv/charset_alias.rb (charset_alias): use CP932 instead of
  SHIFT_JIS on cygwin.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@4476 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2003-09-01 15:41:31 +00:00
nobu
5172e595c9 * ext/iconv/iconv.c (iconv_convert): append unchanged portion
after overflow.  [ruby-dev:21006]

* ext/iconv/extconf.rb: check if iconv() 2nd argument is const.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@4223 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2003-07-30 01:31:43 +00:00
nobu
0770898bb9 * ext/iconv/iconv.c (check_iconv): check if Iconv instance.
* ext/iconv/iconv.c (iconv_convert): stringify argument.

* ext/iconv/iconv.c (iconv_failure_initialize): limit
  inspect message.  [ruby-dev:20785]

* ext/iconv/iconv.c (rb_str_derive): share with original
  string if possible.  [ruby-dev:20785]


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@4118 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2003-07-23 01:11:20 +00:00
nobu
3b1e7ac785 * ext/iconv/charset_alias.rb, ext/iconv/extconf.rb: make wrapper
script which maps charset names.  [ruby-dev:20625]

* ext/iconv/iconv.c (charset_map): charset name map.

* ext/iconv/iconv.c (iconv_dfree): no exception while
  finalization.

* ext/iconv/iconv.c (iconv_s_conv): new method Iconv.conv.
  [ruby-dev:20588]


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@4096 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2003-07-18 19:51:42 +00:00
matz
f595d5b0d2 * array.c (rb_ary_values_at): new method to replace select(index..).
* hash.c (rb_hash_values_at,env_values_at): ditto.

* re.c (match_values_at): ditto.

* struct.c (rb_struct_values_at): ditto.

* re.c (match_select): add iterator behavior.
	* ext/curses/curses.c, ext/digest/sha2/sha2.c, ext/iconv/iconv.c,
	  ext/racc/cparse/cparse.c: include "ruby.h" at the top to shut up
	  "_FILE_OFFSET_BITS redefined" warning on Solaris.

* class.c (rb_class_protected_instance_methods): now gives
  warnings to show migration path.  The default will be reversed
  on Jan 2004.

* numeric.c (num_step): "1.1.step(1.5,0.1)" to work.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@3754 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2003-05-04 16:03:24 +00:00
nobu
3780ede6ef * ext/curses/curses.c, ext/digest/digest.c, ext/dl/handle.c,
ext/dl/ptr.c, ext/dl/sym.c, ext/gdbm/gdbm.c, ext/iconv/iconv.c,
  ext/stringio/stringio.c, ext/strscan/strscan.c,
  ext/tcltklib/tcltklib.c, ext/win32ole/win32ole.c:
  use rb_define_alloc_func().


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@3193 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2002-12-20 11:23:40 +00:00
matz
253581c432 * re.c (rb_reg_s_quote): # also should be quoted.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@2440 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2002-05-07 08:32:01 +00:00
nobu
ba90943088 * ext/iconv/iconv.c (iconv_try): should initialize exceptions
properly. (ruby-bugs-ja:PR#232)


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@2437 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2002-05-07 07:09:02 +00:00
nobu
23beb1a9dd * ext/iconv/iconv.c: fixed document, Iconv#new is no longer an
iterator. thanks to Tanaka Akira <akr@m17n.org>.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@2206 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2002-03-15 05:05:34 +00:00
nobu
5fab414c02 Initial revision
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@2202 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2002-03-14 13:10:57 +00:00