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

2173 Коммитов

Автор SHA1 Сообщение Дата
usa 3486311d54 * ext/tk/sample/tkextlib/vu/canvSticker2.rb,
ext/tk/sample/demos-{en,jp}/bind.rb: fix typo. [ruby-dev:32668]



git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@14436 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2007-12-21 16:11:39 +00:00
nagai 59a07a0690 Ruby/Tk :: provisional support on Ruby-VM and Tcl/Tk8.5.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@14426 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2007-12-21 08:57:35 +00:00
naruse 72d638fb2f * ext/nkf/nkf-utf8/config.h (MIME_DECODE_DEFAULT, X0201_DEFAULT):
defined as FALSE.  nkf and kconv don't decode MIME encoded string
 and don't convert JIS X 0201 Katakana.

* test/nkf/test_kconv.rb: fix tests.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@14417 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2007-12-21 07:50:31 +00:00
matz f1a81f92ca * ext/bigdecimal/bigdecimal.c (VpMidRound): Round method bug
pointed by Ryan Platte fixed(Patch to the patch from "NATORI
  Shin").  [ruby-talk:273360]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@14414 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2007-12-21 07:14:42 +00:00
akr 4cf437519f * regerror.c, string.c, io.c, lib/getoptlong.rb, lib/net/imap.rb,
compile.c, sprintf.c, parse.y, ext/win32ole/win32ole.c,
  ext/tk/sample/demos-en/entry3.rb, ext/tk/lib/tcltk.rb,
  ext/openssl/ossl_bn.c, numeric.c, vm.c,
  benchmark/bm_so_meteor_contest.rb, bignum.c, ruby.c: don't "illegal"
  for non law violation context.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@14377 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2007-12-21 02:31:11 +00:00
gotoyuzo ec0340b4b6 * ext/openssl/lib/openssl/ssl.rb (OpenSSL::SSL::SSLContext.build):
enable CRL checking on default cert store.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@14372 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2007-12-20 16:27:14 +00:00
naruse dec6ba8a22 * ext/nkf/nkf-utf8/nkf.c: Updated.
* ext/nkf/nkf.c (rb_nkf_enc_get): added.
  (find encoding or replicate default encoding)

* ext/nkf/nkf.c (NKF::<ENCODING>): redefine encoding constant.

* ext/nkf/lib/kconv.rb (Kconv::<ENCODING>): redefined as Encoding.

* ext/nkf/lib/kconv.rb: refactoring.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@14330 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2007-12-19 10:19:38 +00:00
naruse 0cf4378f14 * ext/nkf/nkf.c (NKF::_ENCODING): removed.
* ext/nkf/nkf.c (rb_nkf_kconv): renamed to rb_nkf_convert.

* ext/nkf/nkf.c (rb_nkf_convert): set encoding.

* ext/nkf/nkf.c (rb_nkf_guess1): removed.

* ext/nkf/nkf.c (rb_nkf_guess2): renamed to rb_nkf_guess.

* ext/nkf/nkf.c (rb_nkf_guess):
  guess method now returns encoding object.

* ext/nkf/nkf-utf8/nkf.c: Update to nkf 2.0.8 2007-12-19.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@14315 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2007-12-19 04:29:22 +00:00
gotoyuzo d99a343dfd fix typo in last commit.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@14305 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2007-12-18 14:03:42 +00:00
gotoyuzo bd67956690 * ext/openssl/lib/openssl/ssl.rb (OpenSSL::SSL::SSLServer#shutdown):
new method which calls TCPSocket#shutdown of the underlying socket.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@14304 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2007-12-18 13:57:48 +00:00
usa 2364c5e6e7 * dl/win32/lib/win32/sspi.rb: use pack/unpack("m") instead of base64
library which was already removed.



git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@14301 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2007-12-18 13:12:56 +00:00
gotoyuzo 2c03835396 * ext/openssl/ossl_ssl.c (ossl_sslctx_set_ssl_version):
new method OpenSSL::SSL::SSLContext#ssl_version to wrap
  SSL_CTX_set_ssl_version.

* ext/openssl/ossl_ssl.c (ossl_ssl_get_verify_result):
  new method OpenSSL::SSL::SSLSocket#verify_result to wrap
  SSL_get_verrify_result.

* ext/openssl/lib/openssl/ssl.rb (OpenSSL::SSL::SSLContext.build):
  new method to build OpenSSL::SSL::SSLContext with Hash parameters.
  this method provides safety default parameters than SSLContext.new.

* ext/openssl/lib/openssl/ssl.rb (OpenSSL::SSL.verify_cetificate_identity):
  new module function: pull out identity verification process
  from OpenSSL::SSL::SSLSocket#post_connection_check.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@14270 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2007-12-17 12:18:28 +00:00
nobu b2d9f1e9d0 * common.mk (encs): new target to compile external encodings.
* enc/Makefile.in: became a serb template.

* enc/make_encmake.rb: creates enc.mk from enc/Makefile.in using serb.

* lib/mkmf.rb (relative_from): moved from ext/extmk.rb.

* lib/mkmf.rb ($extmk): true if under to top source directory, not
  only ext.

* lib/mkmf.rb (depend_rules): extracted from create_makefile.

* tool/serb.rb (serb): splitted from tool/compile_prelude.rb.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@14267 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2007-12-17 08:47:28 +00:00
gotoyuzo d4f5b77d3a * ext/openssl/lib/openssl/buffering.rb (Buffering#gets): added second
optional argument to specify maximum length limit.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@14261 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2007-12-17 07:06:16 +00:00
nobu 8b6cb6994c * common.mk (ruby.imp): fix for circular dependency. a patch from
Yutaka Kanemoto <kinpoco AT gmail.com> in [ruby-dev:32590].

* regint.h, st.c, ext/json/ext/generator/generator.c: suppress
  warnings on AIX.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@14226 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2007-12-14 04:47:57 +00:00
nobu e9ac3573f0 * ext/readline/extconf.rb: should use have_func for functions instead
of have_var.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@14225 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2007-12-14 03:36:37 +00:00
akr f1b7e60cb9 * encoding.c (rb_enc_mbclen): make it never fail.
(rb_enc_nth): don't check the return value of rb_enc_mbclen.
  (rb_enc_strlen): ditto.
  (rb_enc_precise_mbclen): return needmore(1) if e <= p.
  (rb_enc_get_ascii): new function for extracting ASCII character.

* include/ruby/encoding.h (rb_enc_get_ascii): declared.

* include/ruby/regex.h (ismbchar): removed.

* re.c (rb_reg_expr_str): use rb_enc_get_ascii.
  (unescape_escaped_nonascii): use rb_enc_precise_mbclen to determine
  the termination of escaped non-ASCII character.
  (unescape_nonascii): use rb_enc_precise_mbclen.
  (rb_reg_quote): use rb_enc_get_ascii.
  (rb_reg_regsub): use rb_enc_get_ascii.

* string.c (rb_str_reverse) don't check the return value of
  rb_enc_mbclen.
  (rb_str_split_m): don't call rb_enc_mbclen with e <= p.

* parse.y (is_identchar): use ISASCII.
  (parser_ismbchar): removed.
  (parser_precise_mbclen): new macro.
  (parser_isascii): new macro.
  (parser_tokadd_mbchar): use parser_precise_mbclen to check invalid
  character precisely.
  (parser_tokadd_string): use parser_isascii.
  (parser_yylex): ditto.
  (is_special_global_name): don't call is_identchar with e <= p.
  (rb_enc_symname_p): ditto.

  [ruby-dev:32455]

* ext/tk/sample/tkextlib/vu/canvSticker2.rb: remove coding cookie
  because the encoding is not UTF-8.  [ruby-dev:32475]


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@14131 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2007-12-08 02:50:43 +00:00
gotoyuzo 990bec9702 * ext/openssl/lib/net/ftptls.rb, ext/openssl/lib/net/telnets.rb:
half-finished libraries are discontinued.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@14130 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2007-12-07 11:35:13 +00:00
naruse 46d6af3a9c * ext/iconv/iconv.c (iconv_s_list): support NetBSD/Citrus iconv.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@14115 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2007-12-05 16:04:12 +00:00
nobu 398cdd3825 * ext/iconv/iconv.c (iconv_convert): should not set encoding unless
the target encoding is supported.  [ruby-dev:32451]


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@14103 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2007-12-04 10:56:44 +00:00
naruse 01b097e475 * ext/nkf/lib/kconv.rb (tojis, tosjis, toeuc, toutf8):
set encoding. [ruby-dev:32447]


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@14101 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2007-12-04 09:06:41 +00:00
naruse 825ce503c0 * lib/json.rb, lib/json/*: moved to ext/json/lib.
--

M    trunk/ChangeLog
D    trunk/lib/json
D    trunk/lib/json.rb
A    trunk/ext/json/lib
A    trunk/ext/json/lib/json
A    trunk/ext/json/lib/json.rb
A    trunk/ext/json/extconf.rb


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@14100 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2007-12-04 08:09:44 +00:00
nobu bea3572740 * ext/iconv/iconv.c (iconv_create): achieve target encoding.
* ext/iconv/iconv.c (iconv_convert, iconv_finish, iconv_iconv,
  iconv_conv): set result string encoding.  [ruby-dev:32446]

* ext/iconv/iconv.c (iconv_initialize, iconv_s_open): set encoding to
  Iconv instance.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@14098 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2007-12-04 07:34:49 +00:00
usa 97a9e9da85 * ext/Win32API/*: removed or moved to ext/dl/win32.
* ext/dl/win32/*: new. [ruby-dev:32387]



git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@14093 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2007-12-03 02:53:13 +00:00
matz e46a617759 * ext/syck/rubyext.c (rb_syck_mktime): avoid segmentation fault.
[ruby-core:13735]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@14050 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2007-11-30 10:42:40 +00:00
naruse 0cf0b82418 * ext/json, lib/json, test/json: Update to JSON 1.1.2.
(RubyForge#15447)

* math.c: fix typo.
-- 

M    ChangeLog
M    math.c
M    ext/json/ext/generator/generator.c
M    ext/json/ext/parser/parser.rl
M    ext/json/ext/parser/parser.c
M    lib/json/version.rb
M    lib/json/editor.rb
M    lib/json/common.rb
M    lib/json/pure/parser.rb
M    test/json/test_json_unicode.rb
M    test/json/test_json_fixtures.rb
M    test/json/test_json_generate.rb
M    test/json/test_json_addition.rb
M    test/json/test_json.rb
M    test/json/runner.rb


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@14044 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2007-11-28 09:22:57 +00:00
nobu 49b1513d1e * ext/extmk.rb (extract_makefile): use dldflags instead of DLDFLAGS to
get rid of mixing $LDFLAGS and $ARCH_FLAG.

* lib/mkmf.rb (configuration): ditto.

* lib/mkmf.rb (create_makefile): support for extensions which has no
  shared object.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@14041 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2007-11-28 05:43:17 +00:00
matz 7a978073c9 * parse.y (parser_yylex): should clear parser->tokp as well.
[ruby-dev:32250]

* parse.y: remove NEED_ASSOC that break test_parser_events.

* parse.y (parser_yylex): should not decrement line numbers at the
  end of file.

* file.c (rb_find_file_ext): search .rb files first through in the
  loadpath.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@13966 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2007-11-19 07:10:09 +00:00
suke 24dcd39f19 ext/win32ole/win32ole.c (ole_invoke): bug fix. [ruby-talk:279100]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@13952 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2007-11-17 15:04:55 +00:00
nobu 0d95854a52 * ext/iconv/iconv.c (iconv_iconv): also instance method needs to be
qualified.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@13948 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2007-11-16 08:41:37 +00:00
nobu 85b72a85b5 * ext/iconv/iconv.c (Document-class): moved the simplest example to
the top.

* ext/iconv/iconv.c (iconv_s_iconv): Document-method: needs class
  prefix for class method.  [ruby-core:13542]


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@13947 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2007-11-16 08:03:36 +00:00
why c0978692df * ext/syck/rubyext.c: Node#value defined twice.
* lib/yaml/: several method redefinitions causing warnings.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@13942 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2007-11-15 18:36:51 +00:00
usa 0595aef18e * ext/curses/extconf.rb: check macro if cannot find func.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@13936 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2007-11-15 10:50:34 +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
nobu d5a3389886 * common.mk (parse.c), ext/ripper/depend (ripper.c): process after
bison with sed.  [ruby-dev:32204]

* ruby.c (proc_options): use yydebug in cmdline_options.

* ruby.c (process_options): set yydebug flag of parser.

* parse.y (yydebug): moved into struct parser_params.

* parse.y (rb_parser_get_yydebug, rb_parser_set_yydebug): parser
  generic methods.

* */Makefile.sub (parse.c): moved to common.mk.

* tool/ytab.sed: comment out yydebug definition, and substitute
  yyerror with parser_yyerror.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@13908 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2007-11-13 12:41:41 +00:00
akr 124bdf8815 rescue Errno::EWOULDBLOCK as well as Errno::EAGAIN in sample code in rdoc.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@13759 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2007-10-23 07:40:56 +00:00
akr 297d2e05cb * ext/socket/socket.c (s_accept_nonblock): make accepted fd
nonblocking.  [ruby-talk:274079]


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@13699 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2007-10-14 16:18:41 +00:00
suke 31c764ff7f * ext/win32ole/win32ole.c (foletype_s_ole_classes,
foletype_s_typelibs): refactoring.
	
* test/win32ole/test_win32ole_type.rb: add some test. 

* ext/win32ole/win32ole.c (Init_win32ole): change method name
  WIN32OLE_TYPELIB.ole_types from WIN32OLE_TYPELIB.ole_classes.

* test/win32ole/test_win32ole_typelib.rb: ditto.

* test/win32ole/test_folderitem2_invokeverb.rb: check create
  shortcut string more strictly (This test is invoked in Japanese
  Windows environment).



git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@13690 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2007-10-13 12:40:24 +00:00
gotoyuzo 3ecc791ddc * lib/net/imap.rb, lib/net/smtp.rb, lib/net/pop.rb: hostname should
be verified against server's indentity as persented in the server's
  certificate. [ruby-dev:31960]

* ext/openssl/lib/net/telnets.rb, ext/openssl/lib/net/ftptls.rb: ditto.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@13656 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2007-10-08 11:14:41 +00:00
matz f63aae063a * ext/nkf/nkf.c, bin/ri, bin/irb: fixed typos in doc and comments.
a patch from Eugene Ossintsev  <eugoss AT gmail.com>.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@13609 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2007-10-03 14:39:54 +00:00
akr 5c0e68c39c * include/ruby/intern.h: export rb_ivar_foreach.
* include/ruby/ruby.h: modify struct RObject and RClass for optimizing
  T_OBJECT space.  [ruby-dev:31853]
  (ROBJECT_LEN, ROBJECT_PTR)
  (RCLASS_IV_TBL, RCLASS_M_TBL, RCLASS_SUPER, RCLASS_IV_INDEX_TBL)
  (RMODULE_IV_TBL, RMODULE_M_TBL, RMODULE_SUPER): abstract accessor
  defined.

* variable.c: support the modified RObject and RClass.

* object.c: ditto.

* class.c: ditto.

* gc.c: ditto.

* marshal.c: ditto.

* eval_method.ci: use the abstract accessor.

* insns.def: ditto.

* proc.c: ditto.

* struct.c: ditto.

* eval.c: ditto.

* error.c: ditto.

* vm.c: ditto.

* insnhelper.ci: ditto.

* ext/digest/digest.c: ditto.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@13543 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2007-09-28 06:21:46 +00:00
ko1 29538dbb0e * ext/fiber/fiber.c: modify prototype declaration.
[ruby-core:12247]



git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@13534 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2007-09-27 06:45:03 +00:00
ko1 e826eec433 * cont.c: Fiber as SemiCoroutine on default. [ruby-core:12146]
* ext/fiber/fiber.c: enable Fiber#transfer.



git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@13519 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2007-09-26 10:26:35 +00:00
nobu 7ab48f03e9 * ext/strscan/strscan.c (strscan_initialize, strscan_getch): use the
encoding of the target string instead of setting to StringScanner
  instance.  [ruby-dev:31831]


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@13506 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2007-09-24 08:56:24 +00:00
gotoyuzo 4f04f0372b * lib/net/http.rb: an SSL verification (the server hostname should
be matched with its certificate's commonName) is added.
  this verification can be skipped by
  "Net::HTTP#enable_post_connection_check=(false)".
  suggested by Chris Clark <cclark at isecpartners.com>

* lib/net/open-uri.rb: use Net::HTTP#enable_post_connection_check to
  perform SSL post connection check.

* ext/openssl/lib/openssl/ssl.c
  (OpenSSL::SSL::SSLSocket#post_connection_check): refine error message.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@13499 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2007-09-23 22:21:18 +00:00
nobu 2f4951f01e * ext/stringio/stringio.c (strio_init): separate from strio_initialize
to share with strio_reopen properly.  [ruby-Bugs-13919]


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@13482 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2007-09-21 20:19:51 +00:00
aamine 3f483f7082 * parse.y (ripper): rename event: arglist_* -> args_*.
* parse.y (ripper): rename event: restparam -> rest_param.
* parse.y (ripper): rename event: constpath_* -> const_path_*.
* parse.y (ripper): rename event: topconst_* -> top_const_*.
* parse.y (ripper): rename event: iter_block -> method_add_block.
* parse.y (ripper): support block local parameter declaration.
* parse.y (ripper): introduce new macro params_new.
* ext/ripper/lib/ripper/sexp.rb: should not dispose event arguments whose name ends with "_new" but arity != 0.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@13465 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2007-09-17 12:02:35 +00:00
suke b528261ad8 * ext/win32ole/win32ole.c (fev_unadvise): no needs to reset
event handlers.



git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@13445 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2007-09-14 13:25:44 +00:00
matz 080605efb1 * ext/stringio/stringio.c (strio_getc): rb_enc_mbclen() fix.
* ext/stringio/stringio.c (strio_ungetc): ditto.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@13352 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2007-09-06 15:42:53 +00:00
matz edd7c787ad * array.c (rb_ary_cycle): typo in rdoc. a patch from Yugui
<yugui@yugui.sakura.ne.jp>.  [ruby-dev:31748]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@13348 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2007-09-06 12:33:45 +00:00
suke 9ecd43fa98 * ext/win32ole/win32ole.c: add WIN32OLE_EVENT#unadvise.
* test/win32ole/test_win32ole_event.rb: ditto.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@13341 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2007-09-04 11:48:53 +00:00
suke 0c5e6ab2bb * ext/win32ole/win32ole.c (ole_event_free): IConnectionPoint should be
released.

* ext/win32ole/win32ole.c (EVENTSINK_Destructor): ITypeInfo should be
  released.

* ext/win32ole/win32ole.c (fev_initialize): refactoring.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@13329 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2007-09-01 11:11:51 +00:00
akr 1591776d46 forgot to modify
ext/json/ext/parser/parser.rl and
ext/tk/tkutil/tkutil.c.



git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@13312 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2007-08-29 23:38:38 +00:00
akr 2a4c4f7b0c * include/ruby/intern.h: declare rb_hash_tbl.
* include/ruby/ruby.h (RHash): delay st_table allocation.
  rename tbl field to ntbl to detect direct reference to the st_table
  as a compile error.
  (RHASH_TBL): abstract accessor defined.
  (RHASH_ITER_LEV): ditto.
  (RHASH_IFNONE): ditto.
  (RHASH_SIZE): ditto.
  (RHASH_EMPTY_P): ditto.

* hash.c: delay st_table allocation.

* gc.c: replace tbl by ntbl.

* array.c: replace direct field accessor by abstract field accessor
  such as RHASH(hash)->tbl to RHASH_TBL(hash).

* marshal.c: ditto.

* insns.def: ditto.

* ext/iconv/iconv.c: ditto.

* ext/json/ext/generator/generator.c: ditto.

* ext/json/ext/parser/parser.c: ditto.

* ext/syck/rubyext.c: ditto.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@13309 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2007-08-29 23:12:21 +00:00
suke 41585e424b * ext/win32ole/win32ole.c (ole_type_progid): progid getted by
ProgIDFromCLSID should be freed by CoTaskMemFree. Thanks, arton.

* test/win32ole/test_win32ole.rb (test_raise_message): set negative
  compareMode value to raise WIN32OLERuntimeError.

* test/win32ole/test_win32ole_type.rb (test_implemented_ole_types):
  support some environment which returns IShellDispatch5 instead 
  of IShellDispatch.



git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@13296 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2007-08-28 10:23:31 +00:00
suke a1a618ead1 * ext/win32ole/win32ole.c (ole_type_progid): fix the bug.
[ruby-dev:31576]

* test/win32ole/test_win32ole_type.rb (test_initialize):
  remove duplicate assertions.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@13286 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2007-08-27 11:38:29 +00:00
matz fd618e2234 * ext/etc/etc.c (etc_getlogin): update documentation to note
security issue.  [ruby-Bugs-11821]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@13284 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2007-08-27 10:15:18 +00:00
suke 71e6011d63 * ext/win32ole/win32ole.c (ole_wc2mb, reg_enum_key): allocate
buffer should be NULL terminated.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@13277 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2007-08-25 21:57:46 +00:00
suke 890eb07370 * ext/win32ole/win32ole.c (ole_event_free, EVENTSINK_Destructor,
fev_initialize): remove the connection ole_event_free and 
  EVENTSINK_Destructor.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@13272 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2007-08-25 14:01:08 +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
ko1 977d66ec99 * cont.c: separate Continuation and Fiber from core.
* ext/continuation/*, ext/fiber/*: ditto.
* include/ruby/ruby.h: remove rb_cFiber.
* include/ruby/intern.h: add the rb_fiber_new() declaration.
* enumerator.c (next_init): fix to use rb_fiber_new().
* test/ruby/test_enumerator.rb: remove next? tests.
* test/ruby/test_continuation.rb: add a require 'continuation'.
* test/ruby/test_fiber.rb: add a require 'fiber'.



git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@13259 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2007-08-25 02:03:44 +00:00
suke 32716144fd * ext/win32ole/win32ole.c (reg_get_value): use RegQueryValueEx instead
of RegQueryValueEx.

* ext/win32ole/win32ole.c (typelib_file_from_clsid): fix the bug
  that the function always returns Qnil.

* test/win32ole/test_win32ole_type.rb (test_initialize): add some test.



git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@13241 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2007-08-23 11:14:03 +00:00
nobu 0dec7d5788 * ext/tk/tcltklib.c (Init_tcltklib): use rb_set_end_proc().
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@13105 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2007-08-18 08:44:44 +00:00
nobu 29ab4251f7 * configure.in (aix): enable shared by default.
* configure.in (aix): for 64bit-mode AIX.  [ruby-dev:31401]
  + use CC for LDSHARED if non-gcc,
  + moved -G option from *LDFLAGS to LDSHARED,
  + set -brtl only in XLDFLAGS.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@13062 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2007-08-16 07:46:11 +00:00
matz c8c6ab229a * ext/stringio/stringio.c (strio_getc): should returns
one-character string.

* ext/stringio/stringio.c: remove unnecessary prototypes.

* ext/stringio/stringio.c (strio_getbyte): new method.

* ext/stringio/stringio.c (strio_readbyte): new method.

* ext/stringio/stringio.c (strio_ungetc): should take a string as
  an input.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@12934 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2007-08-15 00:33:33 +00:00
ko1 14c3aa52ae * proc.c (Init_Proc), eval.c (Init_eval), eval_intern.h: move
init place of exception_error.
* inits.c: ditto.
* eval.c (Init_eval): set exception_error#throwed_state as TAG_FATAL.
  [ruby-dev:31407]
* bootstraptest/test_exception.rb: add a test for above.



git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@12930 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2007-08-14 10:53:53 +00:00
matz 7db17c6ad6 * ext/dl/cptr.c (rb_dlptr_s_to_ptr): no longer check
HAVE_RB_IO_STDIO_FILE.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@12907 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2007-08-08 10:20:08 +00:00
matz 4b3644bef7 * ext/dl/cptr.c (rb_dlptr_s_to_ptr): fptr->f was renamed to fd. a
report from Yusuf Celik <ycelik AT oytek.com.tr>.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@12906 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2007-08-08 10:00:06 +00:00
nobu 27b103f37a * ext/pty/pty.c (establishShell): handshaking before close slave
device.  [ruby-talk:263410]


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@12899 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2007-08-07 05:58:41 +00:00
nobu a37d419c5d * ext/pty/pty.c (MasterDevice, SlaveDevice, deviceNo): constified.
* ext/pty/pty.c (SlaveName): removed static buffer.

* ext/pty/expect_sample.rb: support for autologin.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@12898 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2007-08-07 05:56:52 +00:00
nobu 341ae6ac3e * ext/extmk.rb (extmake): save all CONFIG values.
* ext/extmk.rb (extmake): remove mkmf.log at clean, and extconf.h at
  distclean, respectively.

* ext/extmk.rb: remove rdoc at clean, and installed list file at
  distclean, respectively.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@12869 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2007-08-03 02:05:57 +00:00
matz 0e83f22cf5 * ext/digest/lib/digest.rb (Digest::self.const_missing): avoid
infinite recursive const_missing call.  [ruby-talk:262193]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@12851 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2007-07-28 00:44:08 +00:00
nobu f1622c195d * file.c (rb_file_s_rename): deleted code to get rid of a bug of
old Cygwin.

* file.c (rb_file_truncate): added prototype of GetLastError()
  on cygwin.  [ruby-dev:31239]

* include/ruby/intern.h (is_ruby_native_thread): prototype.

* missing/strftime.c (strftime): fix printf format and actual
  arguments.

* ext/Win32API/Win32API.c (Win32API_initialize): ditto.

* ext/tk/tcltklib.c (ip_finalize): ditto.

* ext/win32ole/win32ole.c (lcid_installed): ditto.

* ext/socket/getnameinfo.c: include stdio.h always.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@12836 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2007-07-22 05:33:54 +00:00
nobu 98a54d46f7 * ext/openssl/ossl_config.c (ossl_config_set_section): do not
initialize aggregations with dynamic values.  [ruby-talk:259306]


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@12821 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2007-07-20 06:22:54 +00:00
nobu cba32dcaa6 * ext/dl/cfunc.c (rb_dlcfunc_call): adjust format. [ruby-dev:31222]
* ext/digest/digest.c (rb_digest_instance_update,
  rb_digest_instance_finish, rb_digest_instance_reset,
  rb_digest_instance_block_length): %s in rb_raise() expects char*.
  [ruby-dev:31222]

* ext/openssl/ossl.h: include ossl_pkcs5.h.  [ruby-dev:31231]

* ext/openssl/ossl_pkcs5.h: new file for PKCS5.  [ruby-dev:31231]

* ext/openssl/ossl_x509name.c (ossl_x509name_to_s): use ossl_raise()
  instead of rb_raise().  [ruby-dev:31222]

* ext/sdbm/_sdbm.c: DOSISH platforms need io.h.  [ruby-dev:31232]

* ext/syck/syck.h: include stdlib.h for malloc() and free().
  [ruby-dev:31232]

* ext/syck/syck.h (syck_parser_set_input_type): prototype added.
  [ruby-dev:31231]

* win32/win32.c: include mbstring.h for _mbspbrk().  [ruby-dev:31232]

* include/ruby/win32.h (rb_w32_getcwd): prototype added.
  [ruby-dev:31232]


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@12799 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2007-07-15 13:24:39 +00:00
matz f3750dbf99 * ext/json/ext/generator/generator.c (check_max_nesting): wrong
format specifier.  a patch from pegacorn <subscriber.jp AT gmail.com>.
  [ruby-dev:31217]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@12780 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2007-07-14 02:14:31 +00:00
ko1 6b6bf4dd48 * blockinlining.c: remove "yarv" prefix.
* array.c, numeric.c: ditto.
* insnhelper.ci, insns.def, vm_evalbody.ci: ditto.
* yarvcore.c: removed.
* yarvcore.h: renamed to core.h.
* cont.c, debug.c, error.c, process.c, signal.c : ditto.
* ext/probeprofiler/probeprofiler.c: ditto.
* id.c, id.h: added.
* inits.c: ditto.
* compile.c: rename internal functions.
* compile.h: fix debug flag.
* eval.c, object.c, vm.c: remove ruby_top_self.
  use rb_vm_top_self() instead.
* eval_intern.h, eval_load: ditto.
* gc.c: rename yarv_machine_stack_mark() to
  rb_gc_mark_machine_stack().
* insnhelper.h: remove unused macros.
* iseq.c: add iseq_compile() to create iseq object
  from source string.
* proc.c: rename a internal function.
* template/insns.inc.tmpl: remove YARV prefix.
* thread.c:
* vm.c (rb_iseq_eval): added.
* vm.c: move some functions from yarvcore.c.
* vm_dump.c: fix to remove compiler warning.



git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@12741 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2007-07-12 04:25:46 +00:00
naruse 322003ef8f * lib/json.rb, lib/json/, ext/json/:
import JSON 1.1.1


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@12723 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2007-07-07 17:15:30 +00:00
nobu e8fc29990f * parse.y (keyword_to_name): constified.
* ext/ripper/eventids2.c (token_to_eventid): ditto.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@12712 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2007-07-06 05:57:14 +00:00
nobu a0aa5f977e * ext/stringio/stringio.c (strio_getline): local variable to be
initialized.  [ruby-dev:31077]


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@12646 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2007-06-28 06:00:09 +00:00
usa d81af2f7b2 * ext/pty/extconf.rb: skip wince and win64.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@12612 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2007-06-25 09:03:43 +00:00
technorama 9fa80b19a6 * ext/openssl/{extconf.rb,ossl_ssl_session.c}:
Fix ruby-Bugs-11513.

* ext/openssl/ossl_pkey_ec.c
  New methods EC::Point.[eql,make_affine!,invert!,on_curve?,infinity?]
  By default output the same key form as the openssl command.

* ext/openssl/ossl_rand.c
  New method Random.status?

* test/openssl/test_ec.rb
  New tests.



git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@12571 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2007-06-18 08:56:21 +00:00
nobu a96b6f0604 * common.mk (realclean): separate local and ext.
* ext/extmk.rb: not remove unrelated directories.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@12553 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2007-06-15 13:31:54 +00:00
nobu 0c57bf4b61 * ext/probeprofiler/probeprofiler.c: clean warnings.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@12515 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2007-06-10 09:35:42 +00:00
nobu 6b95829d71 * ext/extmk.rb: prepend also topdir to mflags at last.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@12505 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2007-06-10 06:09:40 +00:00
nobu c389b3bb63 * Makefile.in, win32/Makefile.sub (XCFLAGS): -I. is needed for *.inc.
* ext/extmk.rb (parse_args): add also topdir to mflags.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@12504 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2007-06-10 05:47:12 +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
akr 3a868301ea * ext/zlib/zlib.c (gzfile_s_open): use FilePathValue to support
to_path.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@12480 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2007-06-08 07:33:59 +00:00
akr 1a8d5ed8cb follow previous lex.c change.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@12473 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2007-06-08 03:47:16 +00:00
naruse b60d64b001 * lib/json/common.rb: Ponder offering parse\! method.
* lib/json/editor.rb: be a bit more robust while loading data.
* ext/json/ext/{generator,parser}/extconf.rb:
  add a have_header directive for st.h
* test/json: fix some tests.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@12456 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2007-06-06 22:38:42 +00:00
nobu a96aacb08c * ext/json, lib/json, test/json: set properties.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@12446 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2007-06-06 01:54:44 +00:00
nobu b244c0dd3a * ext/json/ext/{generator,parser}/extconf.h: removed intermediate files.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@12444 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2007-06-06 01:34:08 +00:00
naruse 3c17590061 * ext/nkf/nkf-utf8/nkf.c (kanji_convert): Fix guess fallback.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@12436 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2007-06-05 05:11:04 +00:00
naruse af1c416728 * lib/json.rb, lib/json, ext/json, test/json:
import JSON library.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@12428 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2007-06-04 12:31:26 +00:00
nagai b69b1af650 * ext/tk/lib/tkextlib/tcllib/tablelist.rb: fix typo.
* ext/tk/lib/tkextlib/tile/dialog.rb: forget to give an argument.
* ext/tk/lib/tkextlib/version.rb: update RELEASE_DATE.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@12388 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2007-05-25 16:10:42 +00:00
nobu 2cdb1c3376 * ext/purelib.rb: commit miss.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@12336 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2007-05-22 21:09:22 +00:00
nobu 80a0e2f753 * ext/extmk.rb, ext/purelib.rb, lib/mkmf.rb, runruby.rb: clear default
load path to get rid of load pre-installed extensions/libraries.
  [ruby-core:11017]


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@12333 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2007-05-22 20:48:34 +00:00
usa cb272b7c2d * ext/iconv/iconv.c (iconv_s_conv): rdoc fix.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@12271 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2007-05-10 06:20:33 +00:00
usa adc782762b * ext/iconv/iconv.c (iconv_s_conv): rdoc fix.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@12269 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2007-05-10 06:13:58 +00:00
nobu 1a89cc308d * configure.in, defines.h, eval_load.c (rb_feature_p, rb_provided,
search_required, rb_require_safe), ext/extmk.rb: Fix
  a bug where a statically linked extension cannot be autoloaded.
  [ruby-dev:30023] / [ruby-dev:30239]

* thread.c: added an internal class, Barrier.

* yarvcore.h (struct rb_vm_struct): moved loading_table from global.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@12246 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2007-05-03 13:19:11 +00:00
akr 24af397fcd clear cmsg padding.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@12220 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2007-04-25 13:37:55 +00:00
akr e3b9378f38 * ext/socket/socket.c (unix_send_io, unix_recv_io): use CMSG_DATA to
align file descriptor appropriately.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@12217 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2007-04-25 10:55:01 +00:00
ko1 ec4a7ccf86 * ext/probeprofiler/probeprofiler.c: fix function name and
return value.



git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@12215 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2007-04-25 05:14:33 +00:00
nobu 5bda3debcf * ext/probeprofiler: set eol-style.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@12214 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2007-04-25 04:10:55 +00:00
ko1 abcbd7ea38 * yarvcore.h: remove rb_control_frame_t#callee_id.
* vm_macro.def: ditto.
* eval_intern.h (exec_event_hooks): fix to check event flags
* eval_intern.h (EXEC_EVENT_HOOK): fix to re-check event flags.
* ext/probeprofiler : added.  this profiler is sampling based
  profiler.
* vm.c: add rb_thread_current_status() API for probeprofiler.
* thread.c (rb_thread_execute_interrupts): add comments.



git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@12213 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2007-04-25 03:50:00 +00:00
nobu 42b3d60056 * ext/extmk.rb ($ruby): add extout directory to include path.
[ruby-core:11003]


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@12209 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2007-04-23 13:13:53 +00:00
matz 047f685d73 * ext/pty/expect_sample.rb: avoid symbolic link representation for
expect.  a patch from Kazuhiro NISHIYAMA <zn at mbf.nifty.com>.
  [ruby-dev:30714]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@12185 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2007-04-16 13:56:19 +00:00
nobu ffa31c2645 * ext/stringio/stringio.c (strio_seek): consistent behavior with
IO#seek.  patch by sheepman in [ruby-dev:30710].


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@12180 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2007-04-16 07:48:50 +00:00
usa 31088109b7 * ext/openssl/ossl_pkey_ec.c (ossl_ec_key_get_group): get rid of
warning. we are aware of it.



git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@12155 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2007-04-06 01:58:01 +00:00
technorama dcc5bd8bcf * ext/openssl/ossl_{bn,x509{attr,cert,name,store}}.c:
Add documentation.



git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@12153 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2007-04-05 19:03:28 +00:00
usa 22405dad92 * ext/openssl/ossl_ssl_session.c (ossl_ssl_session_alloc): should
return value.



git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@12149 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2007-04-05 06:13:37 +00:00
technorama 953e8aca2b * ext/openssl/ossl_pkcs5.c: New module.
* ext/openssl/ossl_{cipher,digest,pkcs7,pkcs12}.c:
  Remove redundant module namespace.

* ext/openssl/lib/openssl/{cipher,digest}.rb
  Add backwards compatibile classes for rearranged classes.

* ext/openssl/ossl_{pkcs7,pkcs12}.c: Add documentation.



git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@12148 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2007-04-05 05:59:22 +00:00
technorama 9ce7494cda * ext/openssl/ossl_ssl.c: Add documentation.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@12142 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2007-04-03 18:29:30 +00:00
nobu 043479247c * ext/openssl/extconf.rb: check for functions added in 1.9.
* ext/openssl/ruby_missing.h: check per features instead by
  checking version code.  [ruby-core:10845]


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@12140 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2007-04-03 07:21:53 +00:00
technorama 8b95ee24de * ext/openssl/ossl_bn.c: More documentation.
* ext/openssl/lib/ossl_{pkey,pkey_ec}.[ch]: Add elliptic curves.



git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@12139 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2007-04-03 07:02:44 +00:00
usa eed46ac633 * ext/socket/socket.c (s_recv, s_recvfrom): some systems (such as
windows) doesn't set fromlen if the socket is connection-oriented.
	  reported by Bram Whillock in [ruby-core:10512] [ruby-Bugs#9061]



git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@12138 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2007-04-03 06:50:41 +00:00
usa 9a41f064fa * ext/openssl/ruby_missing.h: need to include version.h to check
RUBY_VERSION_CODE.



git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@12136 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2007-04-03 00:37:13 +00:00
technorama a05e89ca65 * ext/openssl/ossl_{ssl.[ch],ssl_session.c}},
ext/openssl/lib/openssl/lib/openssl/ssl.rb:
  New SSL::Session class.  Add session cb's, getter/setters,
  config, and statistics methods.



git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@12134 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2007-04-02 22:10:12 +00:00
technorama 3930d3b36b * ext/openssl/{ossl.[ch],ossl_pkey.c} Add documentation.
* ext/openssl/ossl_hmac.c Add reset method.

* ext/openssl/ossl_cipher.c (Cipher#update) Take additional buffer argument.

* ext/openssl/{ossl_bio.c,ossl_ssl.c,ruby_missing.h} compatibility with 1.8.



git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@12133 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2007-04-02 19:00:23 +00:00
technorama 41fa6056ba * ext/openssl/ossl_{bn,cipher,digest,hmac,rand,pkey_{dh,dsa,rsa}}.c: Add Documentation for various methods.
* ext/openssl/lib/openssl/cipher.rb: Ditto

* ext/openssl/ossl_bn.c: add lshift! and rshift! methods.

* ext/openssl/ossl_digest.c: GetDigestPtr() also accept a string.



git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@12128 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2007-03-29 17:29:03 +00:00
nobu e6e5674156 * ext/Win32API/lib/win32/sspi.rb: set properties.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@12115 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2007-03-21 02:27:16 +00:00
matz 33163ad123 * regparse.c, etc.: K&R to ANSI code cleanup patch from Stefan
Huehner <stefan at huehner.org>.  [ruby-core:10543]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@12095 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2007-03-19 03:58:57 +00:00
suke d50f882cf0 * ext/win32ole/win32ole.c: add WIN32OLE#ole_activex_initialize,
a little bit supporting ActiveX control. [ruby-talk:241188]


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@12082 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2007-03-16 13:24:06 +00:00
aamine ae2c8b45d2 * lib/net/http.rb: merge Ruby-SSPI patch contributed by Justin Bailey.
* ext/Win32API/lib/win32/sspi.rb: new file.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@12081 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2007-03-16 13:17:10 +00:00
matz 30aa46db0b * ext/bigdecimal/bigdecimal.c: BigDecimal("-.31") is now
treated as ("-0.31") not as ("0.31").

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@12066 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2007-03-14 05:39:00 +00:00
knu 024a7fd7a4 * ext/openssl/ossl_asn1.c (Init_ossl_asn1): Let rdoc know about
externally defined modules; submitted by Technorama
  Ltd. <oss-ruby AT technorama.net> in [ruby-bugs:PR#4704].

* ext/openssl/ossl_bn.c (Init_ossl_bn): Ditto.

* ext/openssl/ossl_cipher.c (Init_ossl_cipher): Ditto.

* ext/openssl/ossl_digest.c (Init_ossl_digest): Ditto.

* ext/openssl/ossl_hmac.c (Init_ossl_hmac): Ditto.

* ext/openssl/ossl_pkey.c (Init_ossl_pkey): Ditto.

* ext/openssl/ossl_pkey_dh.c (Init_ossl_dh): Ditto.

* ext/openssl/ossl_pkey_dsa.c (Init_ossl_dsa): Ditto.

* ext/openssl/ossl_pkey_rsa.c (Init_ossl_rsa): Ditto.

* ext/openssl/ossl_rand.c (Init_ossl_rand): Ditto.

* ext/openssl/ossl_ssl.c (Init_ossl_ssl): Ditto.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@12040 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2007-03-12 02:01:19 +00:00
suke c769454c0e * ext/win32ole/win32ole.c: add WIN32OLE_TYPELIB#library_name,
WIN32OLE_TYPELIB#visible?.

* test/win32ole/test_win32ole_typelib.rb: ditto.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@12022 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2007-03-09 22:21:59 +00:00
nagai 4cd2a9864c * ext/tk/sample/irbtkw.rbw: fails to exit process.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@12002 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2007-03-06 02:56:32 +00:00
suke e8783d008c * ext/win32ole/win32ole.c (get_ptr_of_variant, ole_set_safe_array,
ole_val2ptr_variant, ole_val2olevariantdata, ole_variant2val,
  ): fix some bugs of WIN32OLE_VARIANT.new when variant type is 
  VT_ARRAY|VT_BSTR or VT_BYREF.

* ext/win32ole/win32ole.c (folevariant_s_array, folevariant_initialize):
  WIN32OLE_VARIANT#[], WIN32OLE_VARIANT#[]=, WIN32OLE_VARIANT#value=
  is defined as instance method of WIN32OLE_VARIANT.

* test/win32ole/test_win32ole_variant.rb: add some test for 
  VT_ARRAY, VT_BYREF variant type.



git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@11959 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2007-03-02 12:35:02 +00:00
knu 75129a3608 better error message
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@11948 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2007-02-28 18:27:50 +00:00
knu 04cd7cc62d * ext/digest/digest.c (get_digest_base_metadata): Allow inheriting
Digest::Base subclasses, which was unintentionally made
  impossible while restructuring Digest classes.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@11947 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2007-02-28 18:24:25 +00:00
usa cebb4b5ca0 * ext/openssl/extconf.rb: no need to check unistd.h and sys/time.h.
they are already checked at configure.
  reported by KOBAYASHI Yasuhiro [ruby-list:43225]


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@11930 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2007-02-28 09:32:56 +00:00
knu 42c647f6fc * ext/nkf/nkf.c (rb_str_resize, rb_nkf_kconv, rb_nkf_guess1,
rb_nkf_guess2): Silence warnings regarding char * vs. unsigned
  char * mismatch; submitted by Lyle Johnson
  <lyle.johnson@gmail.com> in [ruby-core:10416].


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@11904 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2007-02-27 10:35:17 +00:00
knu 0e6521aa5d * ext/bigdecimal/bigdecimal.c (BigDecimal_load): Silence warnings
regarding char * vs. unsigned char * mismatch; submitted by Lyle
  Johnson <lyle.johnson@gmail.com> in [ruby-core:10416].

* ext/digest/sha1/sha1ossl.c (SHA1_Finish): Ditto.

* ext/digest/rmd160/rmd160ossl.c (RMD160_Finish): Ditto.

* ext/digest/digest.c (rb_digest_base_finish,
  rb_digest_base_update): Ditto.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@11902 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2007-02-27 10:08:39 +00:00
nobu 5b10c170e5 * file.c, gc.c, io.c, ruby.h, rubyio.h, win32/win32.h (rb_io_t):
renamed from OpenFile.

* ext/dl/cptr.c, ext/io/wait/wait.c, ext/openssl/ossl.h,
  ext/openssl/ossl_bio.c, ext/openssl/ossl_ssl.c, ext/pty/pty.c,
  ext/readline/readline.c, ext/socket/socket.c: ditto.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@11869 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2007-02-24 10:30:50 +00:00
aamine 6a48d31ced * ext/racc/cparse/cparse.c (cparse_params_mark): remove useless rb_gc_mark. Thanks Tomoyuki Chikanaga. [ruby-dev:30405]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@11835 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2007-02-24 01:38:26 +00:00
suke 1fcf93350f * ext/win32ole/win32ole.c: add WIN32OLE_VARIANT.array,
WIN32OLE_VARIANT#value=, refactoring.

* test/win32ole/test_win32ole_variant.rb: add some test for
  WIN32OLE_VARIANT.array, WIN32OLE_VARIANT#value=.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@11834 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2007-02-23 22:39:25 +00:00
aamine 67c94cae96 * parse.y (lambda): add ripper event. This fixes bus error on "make test-all".
* ext/ripper/extconf.rb: do not stop build.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@11815 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2007-02-23 03:25:26 +00:00
suke 975ce3add3 * ext/win32ole/win32ole.c (installed_code_page_proc,
ole_variant2val): small refactoring.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@11805 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2007-02-20 12:25:40 +00:00
matz 2551d9b534 * ext/socket/socket.c (unix_peeraddr): wrong syscall name in error
message for #peeraddr. a patch from Sam Roberts
  <sroberts at uniserve.com>.  [ruby-core:10366]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@11778 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2007-02-19 08:17:14 +00:00
nobu 9c79e14614 * ext/etc/etc.c (etc_getgrgid): missed to replace a macro.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@11776 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2007-02-18 13:56:15 +00:00
nobu 562f256c54 * configure.in (pid_t, uid_t, gid_t): check if defined.
* intern.h, process.c, rubyio.h, ext/etc/etc.c, ext/pty/pty.c: use
  rb_{pid,uid,gid}_t instead of plain int.  [ruby-dev:30376]

* ext/etc/extconf.rb (PIDT2NUM, NUM2PIDT, UIDT2NUM, NUM2UIDT, GIDT2NUM,
  NUM2GIDT): moved to configure.in.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@11770 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2007-02-18 04:13:09 +00:00
suke fdf4aa982f * ext/win32ole/win32ole.c (ole_variant2val): VC++6 does not
support VT_I8, VT_UI8.



git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@11741 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2007-02-14 13:57:59 +00:00
knu 559be019de * ext/digest/lib/digest.rb (Digest::self.const_missing): Drop
autoloads for sha2 classes in favor of handling in
  const_missing(), to work around a problem exposed on OS X.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@11736 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2007-02-14 12:45:59 +00:00
matz 76a27adfda * ext/socket/socket.c (init_unixsock): path may contain NUL for
abstract unix sockets.  [ruby-core:10288]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@11712 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2007-02-13 15:31:18 +00:00
suke 1a4b93cf92 * ext/win32ole/win32ole.c (ole_variant2val): support VT_I8, VT_UI8.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@11707 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2007-02-12 05:00:41 +00:00
suke 777ad4ee75 * ext/win32ole/win32ole.c (ole_ptrtype2val): ole_type, ole_type_detail
should not return "VARIANT,VARIANT".


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@11705 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2007-02-11 13:45:57 +00:00
suke 70db47aadb * ext/win32ole/win32ole.c (ole_val2olevariantdata):
WIN32OLE_VARIANT#new accepts nil when variant type is VT_ARRAY.

* test/win32ole/test_win32ole_variant.rb: ditto.

* ext/win32ole/win32ole.c: small refactoring.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@11702 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2007-02-11 09:53:10 +00:00
suke 7634900b4e * ext/win32ole/win32ole.c: add WIN32OLE#ole_query_interface.
thanks to Mikael Pahmp.

* test/win32ole/test_win32ole.rb: ditto.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@11690 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2007-02-10 11:29:49 +00:00
nagai 1e37d92b0b * ext/tk/lib/tk.rb: fix typo (TkConfigMethod::__confinfo_cmd,
__conv_keyonly_opts).


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@11680 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2007-02-09 15:30:32 +00:00