ko1
15164bf33c
* insns.def (defined), vm_insnhelper.c (vm_defined):
...
move instruction body to the vm_defined() function.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@50736 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-06-02 19:15:29 +00:00
eregon
86bafab212
* test/ruby/test_module.rb: Do not assume class variable order.
...
Path by @enebo.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@50735 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-06-02 17:32:50 +00:00
mame
ea0bc53ec3
* vm_method.c (rb_method_definition_set): remove a double assignment.
...
Coverity Scan found this bug.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@50734 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-06-02 16:28:50 +00:00
svn
6697ade657
* 2015-06-03
...
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@50733 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-06-02 15:08:13 +00:00
ko1
721e096ffd
* vm_method.c (rb_alias): rename parameter names.
...
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@50732 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-06-02 15:06:29 +00:00
ko1
ac88162198
* method.h: remove rb_method_iseq_t::iseqval.
...
While making a r50728, iseqval is needed (to mark correctly),
but now just iseqptr is enough.
* class.c: catch up this fix.
* gc.c: ditto.
* proc.c: ditto.
* vm_method.c: ditto.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@50731 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-06-02 14:32:33 +00:00
ko1
8ff3ab515c
* proc.c (proc_curry): remove a debug line.
...
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@50730 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-06-02 12:33:07 +00:00
kazu
c218e81435
fix typos [ci skip]
...
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@50729 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-06-02 12:28:38 +00:00
ko1
57b817f4c5
* method.h: make rb_method_entry_t a VALUE.
...
Motivation and new data structure are described in [Bug #11203 ].
This patch also solve the following issues.
* [Bug #11200 ] Memory leak of method entries
* [Bug #11046 ] __callee__ returns incorrect method name in orphan
proc
* test/ruby/test_method.rb: add a test for [Bug #11046 ].
* vm_core.h: remvoe rb_control_frame_t::me. me is located at value
stack.
* vm_core.h, gc.c, vm_method.c: remove unlinked_method... codes
because method entries are simple VALUEs.
* method.h: Now, all method entries has own independent method
definititons. Strictly speaking, this change is not essential,
but for future changes.
* rb_method_entry_t::flag is move to rb_method_definition_t::flag.
* rb_method_definition_t::alias_count is now
rb_method_definition_t::alias_count_ptr, a pointer to the counter.
* vm_core.h, vm_insnhelper.c (rb_vm_frame_method_entry) added to
search the current method entry from value stack.
* vm_insnhelper.c (VM_CHECK_MODE): introduced to enable/disable
assertions.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@50728 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-06-02 04:20:30 +00:00
nobu
ae042f21fb
use assert_raise
...
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@50727 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-06-02 02:18:44 +00:00
nobu
21f2c194bb
test_nonblock.rb: skip if EPROTONOSUPPORT
...
* test/socket/test_nonblock.rb (test_sendmsg_nonblock_seqpacket):
OSX raises EPROTONOSUPPORT.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@50726 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-06-02 02:02:00 +00:00
normal
18e7743817
test/socket/test_nonblock.rb: new test for sendmsg_nonblock
...
sendmsg_nonblock was not tested on any of my systems due to the
common 64K limit. I also don't believe UDP sockets are at all
a useful candidate for sendmsg_nonblock testing since they
should never block on sending.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@50725 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-06-02 01:47:41 +00:00
normal
cb1affb478
lib/benchmark.rb: just use Process::CLOCK_MONOTONIC
...
Assume Process::CLOCK_MONOTONIC exists (possibly emulated) and
there is no need to bloat our code by defining a compatibility
constant.
* lib/benchmark.rb: just use Process::CLOCK_MONOTONIC
[ruby-core:69390]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@50724 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-06-02 00:08:25 +00:00
kazu
fd4ec2bc90
fix a typo [ci skip]
...
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@50722 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-06-01 15:02:49 +00:00
kazu
abe5b048bd
fix typo
...
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@50721 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-06-01 15:00:17 +00:00
svn
ec38e0ead2
* 2015-06-02
...
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@50720 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-06-01 15:00:09 +00:00
kazu
49745b5ac3
fix indent (tabify) [ci skip]
...
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@50719 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-06-01 15:00:04 +00:00
kazu
10f0206c38
fix a typo [ci skip]
...
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@50718 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-06-01 14:59:57 +00:00
nobu
5c18ffe29a
mkmf.rb: split --libs
...
* lib/mkmf.rb (pkg_config): split --libs if --libs-only-l option
is not available. patch in [ruby-core:69428] by Hans Mackowiak.
[ruby-core:69421] [Bug #11201 ]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@50717 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-06-01 13:01:52 +00:00
ko1
4777bdce27
* gc.c (gc_mark_children): remove a garbage character
...
introduced at the last commit.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@50716 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-06-01 12:20:06 +00:00
ko1
7221252ab1
* vm_method.c (rb_method_entry_make): do not show warning message
...
when method_entry is an alias.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@50715 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-06-01 10:26:05 +00:00
nobu
d9d0594a1a
mkmf.rb: logging pkg_config
...
* lib/mkmf.rb (pkg_config): log executing command and its results.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@50714 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-06-01 09:46:41 +00:00
ko1
105a2c079d
* internal.h: move class related definitions.
...
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@50713 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-06-01 06:48:07 +00:00
ko1
cd909b553f
* class.c: remove needless include pragmra for method.h.
...
* struct.c: ditto.
* vm_method.c: ditto.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@50712 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-06-01 06:44:16 +00:00
gogotanaka
900931cc7a
test/ruby/test_complex.rb: Add test for CMath.log2
...
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@50711 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-06-01 06:16:53 +00:00
gogotanaka
8305152dc0
enum.c: [DOC] Fix typo [ci skip][Fix GH-904]
...
Patch provided by @jwworth
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@50710 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-06-01 05:38:59 +00:00
gogotanaka
2351d88f51
lib/csv.rb: [DOC] Fix typo [ci skip][Fix GH-907]
...
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@50709 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-06-01 05:35:42 +00:00
nobu
8e7393559f
tkutil.c: fix out-of-bounds access
...
* ext/tk/tkutil/tkutil.c (cbsubst_table_setup): check array
length not access out-of-bounds.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@50708 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-06-01 01:55:10 +00:00
nobu
847e919e81
ext/date/date_core.c: [DOC] fold long paragraphs
...
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@50707 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-05-31 23:07:49 +00:00
nobu
473427a391
vm_method.c: suppress warning
...
* vm_method.c (rb_frame_visibility_check): suppress comparison
warning by gcc 4.8 and 4.9.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@50706 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-05-31 23:06:25 +00:00
zzak
c10df9b698
[DOC] Decrease heading under DateTime [ci skip]
...
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@50705 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-05-31 22:46:32 +00:00
nobu
30e6825e1b
tkutil.c: fix memory leak and segfault
...
* ext/tk/tkutil/tkutil.c (cbsubst_append_inf_key): extract a
function append a key in subst info to a string. make result
strings first and get rid of potential memory leak.
* ext/tk/tkutil/tkutil.c (cbsubst_get_subst_arg): allocate the
result buffer as a string to fix:
* memory leak when the argument key is not found:
loop {Tk::Event.subst_arg(:a) rescue nil}
* buffer overflow segfault when many arguments:
class T < TkUtil::CallbackSubst
_setup_subst_table([[?a, ?A, :_a]], [])
subst_arg(*[:_a]*1000).size
end
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@50704 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-05-31 22:32:14 +00:00
ko1
1611735b29
* eval_intern.h, vm_method.c: move macros to functions.
...
* SCOPE_TEST(f) -> rb_frame_visibility_test(flag).
* SCOPE_CHECK(f) -> rb_frame_visibility_check(flag).
* SCOPE_SET(f) -> rb_frame_visibility_set(flag).
* load.c (load_ext): use it.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@50703 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-05-31 20:44:56 +00:00
zzak
45458752d3
* ext/date/date_core.c: [DOC] Add comparison of Time and DateTime
...
Patch provided by @pixeltrix
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@50702 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-05-31 19:49:03 +00:00
ko1
ac6990c75f
* vm_core.h (VM_FRAME_MAGIC_DUMMY): introduce new frame type to
...
recognize dummy frame.
* vm.c (th_init): use new frame type.
* vm_args.c (raise_argument_error): ditto.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@50701 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-05-31 19:23:32 +00:00
ko1
258131446c
* class.c (rb_class_has_methods): added to reduce depenedency
...
to internal class data structure.
* internal.h: ditto.
* hash.c (has_extra_methods): use added function.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@50700 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-05-31 19:17:18 +00:00
ko1
3d410dde5c
* gc.c , gc.h (rb_obj_info): export obj_info(VALUE) for debugging.
...
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@50699 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-05-31 19:12:42 +00:00
ko1
c542165757
* test/ruby/test_gc.rb: increase timeout seconds for GC stressful
...
debugging.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@50698 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-05-31 18:53:45 +00:00
svn
954c7562d3
* 2015-06-01
...
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@50697 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-05-31 15:08:26 +00:00
nobu
912ae57b8a
tkutil.c: reduce unnecessary buffer
...
* ext/tk/tkutil/tkutil.c (cbsubst_get_subst_key): reduce
unnecessary buffer. the result string is one byte per one word.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@50696 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-05-31 15:08:05 +00:00
nobu
33604da3f6
test_tempfile.rb: use assert_predicate
...
* test/test_tempfile.rb: use assert_predicate and
assert_not_predicate for better failure messages.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@50695 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-05-31 04:45:10 +00:00
nobu
56ef54338b
test_tempfile.rb: use assert_file
...
* test/test_tempfile.rb: use assert_file for better failure
messages.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@50694 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-05-31 04:45:02 +00:00
ko1
9794af357e
fix indent
...
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@50693 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-05-30 19:58:08 +00:00
ko1
3da0f60bb9
* method.h: fix typo of comments.
...
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@50692 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-05-30 19:18:40 +00:00
ko1
f1d4e8b3b3
* method.h: add VM_METHOD_TYPE_ALIAS rb_method_definition_t::type
...
to fix [Bug #11173 ].
Now, inter class/method alias creates new method entry
VM_METHOD_TYPE_ALIAS, which has an original method entry.
* vm_insnhelper.c (find_defiend_class_by_owner): added.
Search corresponding defined_class from owner class/module.
* vm_method.c (rb_method_entry_get_without_cache): return me->klass
directly for defined_class.
Now, no need to check me->klass any more.
* vm_method.c (method_entry_set0): separated from method_entry_set().
* vm_method.c (rb_alias): make method entry has VM_METHOD_TYPE_ALIAS.
* vm_method.c (release_method_definition): support VM_METHOD_TYPE_ALIAS.
* vm_method.c (rb_hash_method_definition): ditto.
* vm_method.c (rb_method_definition_eq): ditto.
* vm_method.c (release_method_definition): ditto.
* vm_insnhelper.c (vm_call_method): ditto.
* vm_insnhelper.c (vm_method_cfunc_entry): ditto.
* vm_eval.c (vm_call0_body): ditto.
* gc.c (mark_method_entry): ditto.
* proc.c (method_def_iseq): ditto.
* proc.c (method_cref): ditto.
* proc.c (rb_method_entry_min_max_arity): ditto.
* test/ruby/test_alias.rb: add tests.
* test/ruby/test_module.rb: fix a test to catch up current behavior.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@50691 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-05-30 18:45:28 +00:00
ko1
255c16b598
* vm_method.c (rb_unlink_method_entry): make it static.
...
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@50690 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-05-30 18:35:21 +00:00
ko1
744d63aacf
fix ChangeLog message.
...
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@50689 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-05-30 18:34:16 +00:00
svn
7197b86fa8
* 2015-05-31
...
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@50688 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-05-30 18:31:09 +00:00
ko1
9cf6751f83
* method.h, vm_method.c (rb_free_method_entry): constify a parameter.
...
* vm_method.c (rb_unlink_method_entry): constify a parameter.
* vm_core.h: remove useless declaration about rb_unlink_method_entry().
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@50687 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-05-30 18:30:42 +00:00
usa
cc09968d71
* lib/tempfile.rb (Remover#call): fixed wrong condition introduced at
...
r50682.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@50686 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-05-30 09:05:50 +00:00