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

4466 Коммитов

Автор SHA1 Сообщение Дата
tenderlove 3c73f44c7f * ext/psych/parser.c: just get the constant defined in Ruby.
* ext/psych/lib/psych/syntax_error.rb: Psych::SyntaxError now inherits
  from StandardError rather than SyntaxError.  Thanks Eric Hodel!

* test/psych/test_exception.rb: tests for change.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@37292 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-10-22 21:25:02 +00:00
tenderlove 6c6d4568e8 * ext/psych/lib/psych/scalar_scanner.rb: Cache symbols while
tokenizing.  Thanks Kevin Menard!

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@37291 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-10-22 21:24:50 +00:00
tenderlove ca0cf16734 * ext/psych/lib/psych/scalar_scanner.rb: Updated the RegExp to catch
Strings earlier in the tokenization process.  Thanks Kevin Menard!

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@37290 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-10-22 21:24:36 +00:00
tenderlove b3fb872d9d * ext/psych/lib/psych/visitors/to_ruby.rb: Handle nil tags specially
to avoid slow method_missing calls.  Thanks Kevin Menard!

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@37289 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-10-22 21:14:08 +00:00
tenderlove ec3056ae22 * ext/psych/lib/psych/scalar_scanner.rb: Ignore bad timestamps. If
something looks like a timestamp but has an invalid component, treat
  it as a string instead of throwing an ArgumentError.
  Thanks Rhett Sutphin!

* test/psych/test_scalar_scanner.rb: appropriate tests.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@37288 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-10-22 21:09:56 +00:00
tenderlove c05952c6a1 * ext/psych/lib/psych/scalar_scanner.rb: Fix scalar_scanner to
understand strings starting with an underscore and containing only
  digits.  Thanks Kelley Reynolds.

* test/psych/test_scalar_scanner.rb: test for fix

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@37287 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-10-22 21:06:25 +00:00
tenderlove b00362eb3e * ext/psych/lib/psych.rb: Changed comment in psych.rb to update new
home page for libyaml.  Thanks to Carolyn Ann.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@37285 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-10-22 21:02:16 +00:00
naruse 900b62a2e9 Supress warnings: unused variables
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@37283 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-10-22 00:47:50 +00:00
tadf 2cbb4481bd * ext/date/date_parse.c (date__parse): uses more tight parser if
defined TIGHT_PARSER.  now inactivated; because it introduces
	  incompatibilities and it is a bit slow.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@37277 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-10-21 09:41:25 +00:00
nari c3a46d6aca * include/ruby/ruby.h: add C APIs.
VALUE rb_newobj_of(VALUE klass, VALUE flags)
  #define NEWOBJ_OF(obj,type,klass,flags)
  These allow to change a allocation strategy depending on klass
  or flags.

* gc.c: ditto

* array.c: use new C API.
* bignum.c: ditto
* class.c: ditto
* complex.c: ditto
* ext/socket/ancdata.c: ditto
* ext/socket/option.c: ditto
* hash.c: ditto
* io.c: ditto
* marshal.c: ditto
* numeric.c: ditto
* object.c: ditto
* random.c: ditto
* range.c: ditto
* rational.c: ditto
* re.c: ditto
* string.c: ditto
* struct.c: ditto
  [Feature #7177][Feature #7047]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@37275 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-10-20 06:57:51 +00:00
zzak f1e488e524 * ext/socket/socket.c: Documentation for Socket
Based on a patch by David Albert
  [Bug #7105] [ruby-core:47828]



git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@37274 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-10-20 03:51:33 +00:00
shirosaki 14d59c122f extmk.rb: fix mingw make failure with make -jN
* common.mk (WPROGRAM): need same dependencies as PROGRAM.

* cygwin/GNUmakefile.in (uncommon.mk): move include position
  below WPROGRAM definition to be defined in uncommon.mk.

* ext/extmk.rb (all, static): fix make rubyw.exe failure with make -jN.
  If make of ruby.exe and rubyw.exe run in parallel, link dll and link
  exe run in parallel, which causes link failure on mingw. To fix this,
  we make ruby.exe and rubyw.exe in one make process.
  [ruby-core:48007] [Bug #7165]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@37246 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-10-17 12:20:57 +00:00
nagachika f21ac99ef9 * ext/zlib/zlib.c (zstream_run_func): don't call inflate() when
z->stream.avail_in == 0. it return Z_BUF_ERROR.
  but deflate() could be called with z->stream->avail_in == 0 because
  it has hidden buffer in z->stream->state (opaque structure).
  fix for gem install error. [ruby-dev:46149] [Bug #7040]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@37119 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-10-08 16:40:19 +00:00
ko1 e03d6d9eb8 * ext/objspace/objspace.c: add ObjectSpace#reachable_objects_from.
This method returns an array of objects referenced by given object.
  If given object is special objects such as true/false/nil/Fixnum etc
  then it returns nil. See rdoc for details.
  [ruby-core:39772]
* test/objspace/test_objspace.rb: add a test for this method.
* gc.c: add rb_objspace_reachable_objects_from().
  To make this function, add several member `mark_func_data'
  to rb_objspace_t.  If mark_func_data is not null, then
  gc_mark() calls mark_func_data::mark_func.
* gc.h: export rb_objspace_reachable_objects_from().



git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@37094 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-10-05 08:14:09 +00:00
nobu e2220d19e1 depend: missing dependency
* ext/date/depend: all source files need ruby.h.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@37089 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-10-05 00:26:43 +00:00
nobu 396903d384 depend: dependency
* ext/json/generator/depend: fix missing dependency.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@37073 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-10-03 07:33:24 +00:00
drbrain 48af304cf7 * ext/openssl/ossl_x509store.c (ossl_x509store_add_file): Added
documentation
* ext/openssl/ossl_x509store.c (ossl_x509store_set_default_paths):
  ditto
* ext/openssl/ossl_x509store.c (ossl_x509store_add_cert):  ditto


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@37070 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-10-02 19:36:26 +00:00
ko1 e3990633cb * insns.def (opt_checkenv): remove unused instruction `opt_checkenv'.
* compile.c (iseq_compile_each): ditto.
* node.h: remove unused node `NODE_OPTBLOCK'.
* ext/objspace/objspace.c, gc.c (gc_mark_children): ditto.



git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@37045 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-09-28 06:44:24 +00:00
knu e0bff65092 * ext/syslog/lib/syslog/logger.rb: add a formatter to the
Syslog::Logger object. [Bug #7065]
* test/syslog/test_syslog_logger.rb: ditto.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@37039 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-09-27 09:20:58 +00:00
zzak e4ac8fa282 * ext/ripper/lib/ripper.rb:
Match sample output to Ripper.sexp from current trunk version.
  [Bug #6929]


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@37008 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-09-21 22:15:21 +00:00
zzak cca61dafe8 * ext/ripper/lib/ripper.rb: Documentation for Ripper.
+:void_stmt+ is meaningless
  [Bug #6929] [ruby-core:47507]


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@36992 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-09-19 22:17:16 +00:00
naruse e8854f8c62 * ext/openssl/ossl_ssl.c (ossl_sslctx_attrs): add npn_select_db to
suppress warning: instance variable @npn_select_cb not initialized

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@36985 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-09-18 08:52:40 +00:00
naruse 3d42b23557 * ext/nkf/nkf-utf8/nkf.c: Merge upstream: 50a383c84.
[ruby-dev:46128] [Bug #7005]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@36968 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-09-14 17:26:39 +00:00
naruse 1aab4196fa * ext/nkf/nkf.c (rb_nkf_convert): suppress warning.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@36966 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-09-14 16:07:49 +00:00
zzak 8f0d172f58 * ext/ripper/lib/ripper.rb: Documentation for Ripper.
* ext/ripper/lib/ripper/lexer.rb: ditto.
* ext/ripper/lib/ripper/sexp.rb: ditto.
* ext/ripper/lib/ripper/filter.rb: ditto.
* ext/ripper/lib/ripper/core.rb: ditto.
  [Bug #6929] [ruby-core:47309]


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@36954 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-09-12 23:04:41 +00:00
nobu 857ec7118f pathname.c: suppress -Wcomment warning
* ext/pathname/pathname.c (path_s_glob): get rid of "/*" within block
  comment.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@36953 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-09-12 14:16:16 +00:00
zzak b5c38622b1 * ext/pathname/lib/pathname.rb: Documentation for Pathname.
* ext/pathname/pathname.c: ditto.
  [Bug #6947] [ruby-core:47354]



git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@36950 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-09-12 13:54:08 +00:00
usa 91987f6b04 * ext/socket/{basicksocket,init,udpsocket}.c: revert some parts of
r36944.  it breaks mswin/mingw ruby and brought into many many
  crashes.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@36946 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-09-10 01:41:59 +00:00
kosaki 84c77c1520 * ext/socket/basicsocket.c (rsock_bsock_send):
avoid unnecessary select() calls before doing I/O
  Patch by Eric Wong. [Feature #4538] [ruby-core:35586]
* ext/socket/init.c (rsock_s_recvfrom): ditto.
* ext/socket/init.c (rsock_s_accept): ditto.
* ext/socket/udpsocket.c (udp_send): ditto.
* io.c (io_fflush): ditto.
* io.c (io_binwrite): ditto.
* io.c (rb_io_syswrite): ditto.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@36944 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-09-09 17:29:12 +00:00
nagachika 9dd9041fcf * ext/extmk.rb: revert r36468. replacing NUL character is not necessary after
r36918,

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@36920 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-09-07 14:34:40 +00:00
nobu d0d68df7d0 mkmf.rb: fix splitting options with an argument
* ext/extmk.rb (extmake), lib/mkmf.rb (have_framework): fix splitting
  options with an argument, not using NUL as special character.
  [ruby-core:47447] [Bug #6987]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@36918 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-09-06 16:21:57 +00:00
nobu af6c038b23 remove trailing spaces.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@36895 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-09-04 00:57:31 +00:00
nobu a4ce3ab4fd remove trailing spaces.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@36886 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-09-03 03:22:22 +00:00
emboss e29819df6e * ext/openssl/extconf.rb: Detect OpenSSL_FIPS macro
ext/openssl/ossl.c: Expose OpenSSL::OPENSSL_FIPS constant to
  indicate whether OpenSSL runs in FIPS mode.
  test/openssl/test_pkey_dh.rb: Generate 256 bit keys for
  non-FIPS installations to improve test performance (e.g. for
  rubyci).
  test/openssl/utils.rb: Replace DSS1 as certificate signature
  digest with SHA1 for FIPS installations when using DSA by
  introducing TestUtils::DSA_SIGNATURE_DIGEST.
  test/openssl/test_x509cert.rb: 
  test/openssl/test_x509crl.rb:
  test/openssl/test_x509req.rb: Use DSA_SIGNATURE_DIGEST
  NEWS: Introduce OpenSSL::OPENSSL_FIPS
  
  These changes allow running the OpenSSL tests in FIPS mode
  while keeping a high performance for non-FIPS installations.
  Introduction of OpenSSL::OPENSSL_FIPS allows for applications
  to react to special requirements when using OpenSSL in FIPS mode.
  [Feature #6946] [ruby-core:47345]
- Diese und die folgenden Zeilen werden ignoriert --

M    ext/openssl/extconf.rb
M    ext/openssl/ossl.c
M    NEWS
M    ChangeLog
M    test/openssl/utils.rb
M    test/openssl/test_x509crl.rb
M    test/openssl/test_x509req.rb
M    test/openssl/test_x509cert.rb
M    test/openssl/test_pkey_dh.rb


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@36884 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-09-03 01:14:26 +00:00
emboss 25e6db3e3c * ext/openssl/extconf.rb: Check existence of OPENSSL_NPN_NEGOTIATED.
ext/ossl_ssl.c: Support Next Protocol Negotiation. Protocols to be
  advertised by the server can be set in the SSLContext by using
  SSLContext#npn_protocols=, protocol selection on the client is
  supported by providing a selection callback with
  SSLContext#npn_select_cb. The protocol that was finally negotiated
  is available through SSL#npn_protocol.
  test/openssl/test_ssl.rb: Add tests for Next Protocol Negotiation.
  NEWS: add news about NPN support.
  [Feature #6503] [ruby-core:45272]


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@36871 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-08-31 09:47:36 +00:00
usa 1d1130eea1 * ext/bigdecimal/bigdecimal.c (BigDecimal_to_f): use self's sign to
determine 0.0 and Inf's sign instead of internal double value's.
  Reported by phasis68 (Heesob Park) at [ruby-core:47381] [Bug #6955]


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@36865 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-08-31 05:34:08 +00:00
nobu 470c941ce5 id.h: independent from parse.h
* template/id.h.tmpl, tool/id2token.rb: make id.h independent from
  parse.h, and make parse.c dependent on it instead.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@36864 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-08-31 05:31:20 +00:00
nobu 30fbd739a1 fix dependency
* ext/json/parser/depend: fix dependency for error that rb_float_new
  is not found.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@36859 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-08-31 04:58:18 +00:00
nobu d7ca01a73a bigdecimal.c: check underflow
* ext/bigdecimal/bigdecimal.c (BigDecimal_to_f): check underflow since
  strtod() sets errno to ERANGE at underflow too.  [ruby-core:47342]
  [Bug #6944]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@36854 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-08-30 07:17:56 +00:00
ko1 3721fb0106 * ext/date/depend: add dependency to $(ruby_headers).
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@36796 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-08-23 07:03:46 +00:00
tenderlove 5571c7315e * ext/syck: removed. Fixes [ruby-core:43360]
* test/syck: removed.

* lib/yaml.rb: only require psych, show a warning if people try to set
  the engine to syck.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@36786 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-08-22 17:43:16 +00:00
tadf c069246931 * ext/date/date_core.c: [ruby-core:47266].
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@36783 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-08-22 10:47:05 +00:00
tadf 280681f40c * ext/date/date_core.c: [ruby-core:47226].
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@36782 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-08-22 10:42:15 +00:00
yugui e782fb8eea * common.mk (vm_backtrace.o): Added missing dependencies.
* ext/nkf/depend (nkf.o): ditto.

* ext/ripper/depend (ripper.o) ditto.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@36767 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-08-22 01:11:30 +00:00
usa 3401fc5984 * ext/dl/lib/dl/func.rb (DL::Function#bind): fixes an error in
test/dl/test_import.rb (DL::TestImport#test_carried_function)
  introduced by r36718.
  the instance of the anonymous class which wraps the block should have
  same methods and instance variables of self.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@36753 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-08-21 06:53:40 +00:00
ryan ed720d5505 Fixed warning for implicit conversion from size_t to int
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@36744 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-08-20 23:59:35 +00:00
usa 4a097d2e3e * ext/dl/lib/dl/func.rb (DL::Function#bind): allow to return/break from
the callback method. (Fiddle already allows it.)
  [Bug #6389] [ruby-dev:45604]



git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@36718 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-08-17 03:42:19 +00:00
ktsj 9564e9bd23 * vm.c (invoke_block_from_c): fix unintentional block passing.
[ruby-dev:45071] [Bug #5832]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@36685 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-08-12 03:04:42 +00:00
naruse a996b48515 * ext/readline/readline.c (Init_readline): rl_catch_signals=0 returns
back. Without this, on FreeBSD9 and readline 6.2 irb can't catch ^C.
  [Bug #5423]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@36653 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-08-07 11:22:04 +00:00
nobu 13527efd59 bigdecimal.c: fix format specifier
* ext/bigdecimal/bigdecimal.c (BigMath_s_log): fix format specifier.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@36633 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-08-05 15:40:56 +00:00