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

28917 Коммитов

Автор SHA1 Сообщение Дата
nobu af1ca4cb13 object.c: check more strictly
* object.c (rb_mod_const_get): check more strictly.  [ruby-dev:46748]
  [Bug #7573]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@38551 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-12-22 10:26:40 +00:00
nagachika 6a35c26b2d * cont.c (rb_fiber_start): in case of jump with TAG_FATAL,
enqueue error into async_errinfo_queue, because you cannot call
  TH_TAG_JUMP() in this function. [ruby-dev:45218]  [Bug #5993]

* thread.c (rb_threadptr_execute_interrupts): now INT2FIX(TAG_FATAL)
  can be popped from async_errinfo_queue.

* vm.c (rb_vm_make_jump_tag_but_local_jump): revert r38441.
  rb_vm_make_jump_tag_but_local_jump() shouldn't return exception
  in case of state == TAG_FATAL.

* test/ruby/test_fiber.rb (test_exit_in_fiber): fix a test to illuminate
  Thread.exit should terminate current Thread.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@38550 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-12-22 06:45:28 +00:00
kazu a44e41e831 fix a typo
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@38549 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-12-22 05:00:00 +00:00
shirosaki ca2fce0cf2 * gc.c (obj_id_to_ref): add a macro to treat Bignum object id.
This follows the change r38493.

* gc.c (id2ref): fix for working fine with Bignum object id on x64
  Windows.
* gc.c (wmap_finalize): ditto.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@38548 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-12-22 04:25:18 +00:00
glass f9e621372d * struct.c (make_struct): remove junk ID check to allow members who
have junk name like "foo\000".
* test/ruby/test_struct.rb: Test for above.
  [Bug #7575] [ruby-dev:46750]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@38547 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-12-22 02:52:48 +00:00
drbrain 570b766901 * lib/net/http.rb: Requests may be created with a URI which sets the
Host header.  Responses contain the requested URI for easier redirect
	  following.  [ruby-trunk - Feature #6482]
	* lib/net/http/generic_request.rb:  ditto.
	* lib/net/http/response.rb:  ditto.j
	* NEWS (net/http):  Updated for above.
	* test/net/http/test_http.rb:  Tests for above.
	* test/net/http/test_http.rb:  ditto.
	* test/net/http/test_httpresponse.rb:  ditto.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@38546 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-12-21 20:36:07 +00:00
zzak 34a3668c30 * lib/irb/slex.rb(#match): Typo, should be D_DETAIL
[ruby-core:51071] [Bug#7600]


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@38545 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-12-21 17:36:14 +00:00
zzak e8a7607ed0 * lib/irb/input-method.rb, lib/irb.rb: Typo in
InputMethod#readable_atfer_eof? to #readable_after_eof?
  [ruby-core:51069] [Bug #7599]


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@38544 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-12-21 17:29:18 +00:00
kosaki 585afbbc6a * vm_dump.c (rb_vm_bugreport): revert r38533.
* addr2line.c (fill_lines): add ELF sanity check.
  [Bug #7597] [ruby-dev:46786]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@38543 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-12-21 17:21:12 +00:00
zzak 4da6fa28f8 * lib/irb/inspector.rb, lib/irb/context.rb: Move IRB::INSPECTORS and
class methods to IRB::Inspector [ruby-core:51067][Bug #7598]


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@38542 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-12-21 17:08:24 +00:00
svn 75584a1d86 * 2012-12-22
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@38540 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-12-21 15:30:53 +00:00
usa e31b67700b * object.c (rb_obj_hash): shouldn't assume object_id can be long.
based on a patch by Heesob Park at [ruby-core:51060].
  cf. [Backport #7454]


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@38539 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-12-21 15:30:44 +00:00
kou 8346f7b2ad * ext/fiddle/lib/fiddle/struct.rb (Fiddle::CStructEntity#set_ctypes):
CPtr -> Pointer.
* test/fiddle/test_c_struct_entry.rb
  (Fiddle::TestCStructEntity#test_aref_pointer):
  Added the test for the above.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@38538 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-12-21 14:16:02 +00:00
kou e852838cee * ext/fiddle/lib/fiddle/struct.rb (Fiddle::CStructEntity#set_ctypes):
CPtr -> Pointer.
* test/fiddle/test_c_struct_entry.rb
  (Fiddle::TestCStructEntity#test_aref_pointer_array):
  Added the test for the above.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@38537 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-12-21 14:12:57 +00:00
kou 3fed8bc9a5 * ext/fiddle/lib/fiddle/import.rb (Fiddle::Importer#sizeof):
CPtr -> Pointer.
* test/fiddle/test_import.rb (Fiddle::TestImport#test_sizeof):
  Added the test for the above.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@38536 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-12-21 13:44:44 +00:00
ko1 914611adbc * test/ruby/test_iseq.rb: disable a test which checks features
removed at r38532.



git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@38535 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-12-21 13:36:17 +00:00
usa 9848f0d0ca * win32/{dir.h,win32.c} (rb_w32_readdir): removed old rb_w32_readdir()
and renamed from rb_w32_readdir_with_enc().
  [ruby-core:24864] [Feature #1927]

* dir.c (READDIR): follow above change.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@38534 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-12-21 13:06:17 +00:00
tarui 315bf4b6d7 * vm_dump.c (rb_vm_bugreport): commentout addr2line call temporarily
in order to avoid segv. anyone can fix addr2line?
	  [Bug #7597] [ruby-dev:46786]


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@38533 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-12-21 12:17:03 +00:00
ko1 17ac783541 * iseq.c (Init_ISeq): remove definition of the following methods:
ISeq#line_trace_all and ISeq#line_trace_specify because they are
  half baked.
  C APIs are remained as experimental. These functions will be
  renamed, removed their parameters may be changed.
  You can use these methods by C exts. Please give us your comments.



git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@38532 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-12-21 11:44:09 +00:00
ko1 a6c5431156 * vm_trace.c (tracepoint_new): add code to support specified thread.
But not tested and this feature is not supported officially.



git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@38531 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-12-21 11:22:54 +00:00
naruse 1ed4ed43f7 Add test for r38529 [Bug #7536]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@38530 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-12-21 10:53:57 +00:00
ko1 f4ef96e6a2 * ruby.c (process_options): need to acquire env from TOPLEVEL_BINDING
each time.
  `bind->env' may update after `eval()'.
  [Bug #7536]



git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@38529 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-12-21 10:39:59 +00:00
ko1 a598fcc8c1 fix ChangeLog
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@38527 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-12-21 09:51:03 +00:00
ko1 8578cc337b * include/ruby/debug.h: define rb_trace_arg_t.
* vm_core.h: catch up above changes.



git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@38526 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-12-21 09:48:15 +00:00
ko1 979479270c add a ticket number
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@38525 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-12-21 09:37:31 +00:00
ko1 87d48d14a0 * vm_core.h, vm_trace.c: fix multi-threading bug for tracing.
Move `trace_arg' from rb_tp_t::trace_arg to rb_thread_t::trace_arg.
  `trace_arg' may changed by multiple threads.
  rb_thread_t::trace_arg can represent rb_thread_t::trace_running
  (null or non-null) and rb_thread_t::trace_running is removed.
  After that, `rb_tp_t' is not needed to check tracing or not
  (A running thread knows tracing or not). This is why I remove
  tp_attr_check_active() and make new function get_trace_arg().
  And this modification disable to work the following code:
  TracePoint.trace{|tp|
  Thread.new{p tp.event} # access `tp' from other threads.
  }
  I believe nobody mix threads at trace procedure.
  This is current limitation.
* cont.c (fiber_switch, rb_cont_call): use rb_thread_t::trace_arg
  instead of rb_thread_t::trace_running.
* test/ruby/test_settracefunc.rb: add a multi-threading test.



git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@38524 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-12-21 09:33:44 +00:00
nobu 94a4bc0ef4 id.h.tmpl: ID2ATTRSET
* template/id.h.tmpl (ID2ATTRSET): compile time constant macro for
  ID_ATTRSET.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@38523 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-12-21 07:38:11 +00:00
nobu 2edcf87c1c id.def: check duplication
* defs/id.def (KeywordError): check duplication.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@38522 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-12-21 07:38:07 +00:00
nobu 298694a2fd id.def: other scope ID
* defs/id.def: support for other scope IDs,
  ID_{INSTANCE,GLOBAL,CONST,CLASS}.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@38521 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-12-21 07:38:03 +00:00
nobu e8794bf215 test_thread.rb: descriptive assertions
* test/ruby/test_thread.rb: (test_local_barrier),
  (test_status_and_stop_p, test_recursive_outer, test_stack_size): use
  more descriptive assertions.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@38520 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-12-21 07:35:49 +00:00
nobu 2ed9c6fe0b test_thread.rb: flush before SystemStackError
* test/ruby/test_thread.rb (TestThread#test_stack_size): need to flush
  before SystemStackError.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@38519 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-12-21 07:35:47 +00:00
nobu 3763c760fd vm_trace.c: style
* vm_trace.c (rb_suppress_tracing): adjust style.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@38518 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-12-21 07:35:42 +00:00
nobu 6bfc7cca58 * properties.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@38517 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-12-21 07:31:28 +00:00
zzak 7e9eb32669 * lib/irb.rb, lib/irb/*: Documentation for IRB
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@38515 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-12-21 05:45:50 +00:00
drbrain 4f7a6aafa5 * lib/rake/*: Updated to rake 0.9.6
* doc/rake/*:  ditto
* test/rake/*:  ditto


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@38514 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-12-21 02:34:37 +00:00
tarui 7764dd9357 * vm_trace.c (rb_suppress_tracing): remove unused variable 'vm_tracing'
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@38513 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-12-20 23:58:16 +00:00
tarui 349b20cc91 * lib/irb/completion.rb (CompletionProc): support completion of
instance variables. [ruby-dev:46710] [Bug #7520]



git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@38512 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-12-20 16:02:43 +00:00
svn d73872f3bc * 2012-12-21
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@38511 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-12-20 15:32:44 +00:00
kazu 5e85f08692 fix typos and tabify
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@38510 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-12-20 15:32:39 +00:00
tarui fbbb06f803 * vm_trace.c (rb_suppress_tracing): bugfix for vm->trace_running
counter. And if tracing is already true, vm_trace_running ops is
	  skipped to control overflow.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@38509 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-12-20 12:02:37 +00:00
nobu 8497a7b918 ruby.h: RTEST NIL_P
* include/ruby/ruby.h (RTEST, NIL_P): make bare expressions without
  outermost parentheses.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@38499 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-12-20 09:29:57 +00:00
nobu ee26f5ec25 tkutil.c: NIL_P
* ext/tk/tkutil/tkutil.c (tk_symbolkey2str, ary2list, ary2list2): do
  not assume NIL_P() to be parenthesized always.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@38498 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-12-20 09:28:35 +00:00
nobu 026518c8e5 ossl.c: RTEST
* ext/openssl/ossl.c (ossl_fips_mode_set): do not assume RTEST() to be
  parenthesized always.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@38497 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-12-20 09:28:33 +00:00
shugo f1f05e75cd * NEWS: fix the description for Refinements.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@38496 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-12-20 08:29:41 +00:00
shugo ea01ffa569 * vm_core.h (rb_vm_defineclass_type_t),
compile.c (iseq_compile_each), insns.def (defineclass): change the
  meaning of the third operand of defineclass as follows:
    lower 3bits: the type of the defineclass
                   0 = class, 1 = singleton class, 2 = module
    4th bit: a flag represents whether the defineclass is scoped
               0 = not scoped (e.g., class Foo)
	       1 = scoped (e.g., class Bar::Baz)
    5th bit: a flag represents whether the superclass is specified
               0 = not specified (e.g., class Foo)
               1 = specified (e.g., class Bar < Foo)
  If the superclass is specified and is not a class, a TypeError
  should be raised.  [ruby-dev:46747] [Bug #7572]

* test/ruby/test_class.rb: related test.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@38495 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-12-20 08:13:53 +00:00
emboss a158034789 * NEWS: announce AEAD encryption support in the OpenSSL extension.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@38494 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-12-20 07:54:13 +00:00
usa 94f42d6d79 * gc.c (nonspecial_obj_id): VALUE is not compatible with Fixnum on
LLP64 platform, such as 64bit Windows.
  reporeted by Heesob Park at [ruby-core:50255] [Bug #7454], and the
  fix is suggested by akr.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@38493 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-12-20 07:43:54 +00:00
emboss b9bd8eaf3b * ext/openssl/ossl_cipher.c: fix errors for installations that do not
feature Authenticated Encryption.
* ext/openssl/extconf.rb: detect presence of EVP_CTRL_GCM_GET_TAG to
  determine whether Authenticated Encryption can be used.
  [Feature #6980] [ruby-core:47426]



git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@38492 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-12-20 07:42:56 +00:00
emboss 4fce754f9b * ext/openssl/ossl.c: do not use FIPS_mode_set if not available.
* test/openssl/utils.rb: revise comment about setting FIPS mode to
  false.
* test/openssl/test_fips.rb: remove tests that cause errors on
  ruby-ci.
  [Feature #6946] [ruby-core:47345]



git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@38491 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-12-20 07:00:11 +00:00
drbrain a6ed298df7 * lib/rdoc/parser/ruby.rb: Ignore methods defined on constants to
prevent modules with the names of constants from appearing in the
  documentation.
* test/rdoc/test_rdoc_parser_ruby.rb:  Test for the above.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@38490 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-12-20 06:23:28 +00:00