summaryrefslogtreecommitdiff
path: root/test
AgeCommit message (Collapse)Author
2013-05-27* vm_trace.c (rb_postponed_job_register_one): fix iteration bug.ko1
* ext/-test-/postponed_job/postponed_job.c, test/-ext-/postponed_job/test_postponed_job.rb: add a test. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@40967 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-05-27test_method.rb: fix for direct invocationnobu
* test/ruby/test_method.rb (TestMethod#test___dir__): use aboslute path for the case invoked directly. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@40966 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-05-27* include/ruby/ruby.h, gc.c: add new internal eventko1
RUBY_INTERNAL_EVENT_GC_END. This event invokes at the end of after_sweep(). Time chart with lazy sweep is here: (1) Kick RUBY_INTERNAL_EVENT_GC_START (2) [gc_marks()] (3) [lazy_sweep()] (4) [... run Ruby program (mutator) with lazy_sweep() ...] (5) [after_sweep()] (6) Kick RUBY_INTERNAL_EVENT_GC_END (7) [... run Ruby program (mutator), and go to (1) ...] * ext/-test-/tracepoint/tracepoint.c, test/-ext-/tracepoint/test_tracepoint.rb: modify a test. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@40963 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-05-27* ext/objspace/objspace.c: support ObjectSpace.trace_object_allocations.ko1
Read the following test to know HOWTO. This feature is a sample of RUBY_INTERNAL_EVENT. * test/objspace/test_objspace.rb: add a test. * ext/objspace/object_tracing.c: ditto. * gc.c (rb_gc_count): add. THis function returns GC count. * internal.h: add decl. of rb_gc_count(). Same as `GC.count'. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@40957 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-05-27* append newline at EOF.nobu
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@40950 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-05-27* test/-ext-/postponed_job/test_postponed_job.rb: fix typo and class name.ko1
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@40948 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-05-27* include/ruby/ruby.h, gc.c, vm_trace.c: add internal events.ko1
* RUBY_INTERNAL_EVENT_NEWOBJ: object created. * RUBY_INTERNAL_EVENT_FREE: object freeed. * RUBY_INTERNAL_EVENT_GC_START: GC started. And rename `RUBY_EVENT_SWITCH' to `RUBY_INTERNAL_EVENT_SWITCH'. Internal events can not invoke any Ruby program because the tracing timing may be critical (under huge restriction). These events can be hooked only by C-extensions. We recommend to use rb_potponed_job_register() API to call Ruby program safely. This change is mostly written by Aman Gupta (tmm1). https://bugs.ruby-lang.org/issues/8107#note-12 [Feature #8107] * include/ruby/debug.h, vm_trace.c: added two new APIs. * rb_tracearg_event_flag() returns rb_event_flag_t of this event. * rb_tracearg_object() returns created/freeed object. * ext/-test-/tracepoint/extconf.rb, ext/-test-/tracepoint/tracepoint.c, test/-ext-/tracepoint/test_tracepoint.rb: add a test. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@40946 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-05-26* remove trailing spaces.nobu
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@40941 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-05-26* include/ruby/debug.h, vm_trace.c: add rb_postponed_job API.ko1
Postponed jobs are registered with this API. Registered jobs are invoked at `ruby-running-safe-point' as soon as possible. This timing is completely same as finalizer timing. There are two APIs: * rb_postponed_job_register(flags, func, data): register a postponed job with data. flags are reserved. * rb_postponed_job_register_one(flags, func, data): same as `rb_postponed_job_register', but only one `func' job is registered (skip if `func' is already registered). This change is mostly written by Aman Gupta (tmm1). https://bugs.ruby-lang.org/issues/8107#note-15 [Feature #8107] * gc.c: use postponed job API for finalizer. * common.mk: add dependency from vm_trace.c to debug.h. * ext/-test-/postponed_job/extconf.rb, postponed_job.c, test/-ext-/postponed_job/test_postponed_job.rb: add a test. * thread.c: implement postponed API. * vm_core.h: ditto. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@40940 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-05-25* test/fiddle/test_handle.rb (Fiddle::TestHandle#test_static_sym): adjust ↵ktsj
indent. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@40931 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-05-25* test/fiddle/test_c_struct_entry.rb,ktsj
test/fiddle/test_c_union_entity.rb, test/fiddle/test_cparser.rb, test/fiddle/test_func.rb, test/fiddle/test_handle.rb, test/fiddle/test_import.rb, test/fiddle/test_pointer.rb: don't run test if the system don't support fiddle. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@40930 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-05-25* dir.c (bracket): fix copy-paste error. When the first and lastmame
characters of fnmatch range have different length, fnmatch may have wrongly matched a path that does not really match. Coverity Scan found this bug. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@40925 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-05-24* variable.c (set_const_visibility): use rb_frame_this_func() insteadcharliesome
of rb_frame_callee() for getting the name of the called method * test/ruby/test_module.rb: add test git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@40915 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-05-24* ext/strscan/strscan.c (strscan_aref): raise error if givennaruse
name reference is not found. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@40912 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-05-23* test/ruby/test_io.rb (TestIO#test_write_32bit_boundary): HFS+ seemsnobu
not supporting a sparce file. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@40896 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-05-23test_io.rb: test for writenobu
* test/ruby/test_io.rb (TestIO#test_write_32bit_boundary): add test for write part. [ruby-core:55098] [Bug #8431] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@40894 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-05-22Fix test failure of binmode from r40879naruse
http://ruby-mswin.cloudapp.net/vc10-x64/ruby-trunk/log/20130521T131601Z.log.html.gz git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@40892 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-05-22win32.c: check error of SetFilePointernobu
* win32/win32.c (setup_overlapped): check the error code in addition to the result of SetFilePointer() to determine if an error occurred, because INVALID_SET_FILE_POINTER is a valid value. [ruby-core:55098] [Bug #8431] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@40888 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-05-21* ext/strscan/strscan.c (strscan_aref): support named captures.naruse
patched by Konstantin Haase [ruby-core:54664] [Feature #8343] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@40881 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-05-21* test/ruby/test_dir_m17n.rb (TestDir_M17N#test_entries_compose):kou
Use #each instead of #map just for iteration. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@40880 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-05-21* ext/digest/lib/digest.rb (Digest::Class.file): Take optionalknu
arguments that are passed to the constructor of the digest class. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@40879 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-05-21test_dir_m17n.rb: sort Dir.entriesnobu
* test/ruby/test_dir_m17n.rb (test_entries_compose): the order on the filesystem does not matter, so sort Dir.entries result to compare. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@40875 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-05-21force_encoding expected result as filesystem encodingnaruse
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@40869 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-05-20dir.c: compose HFS file namesnobu
* dir.c (dir_each): compose HFS file names from UTF8-MAC. [ruby-core:48745] [Bug #7267] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@40868 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-05-20test_dir_m17n.rb: assert_separatelynobu
* test/ruby/test_dir_m17n.rb: prefer assert_separately over assert_ruby_status for more descriptive messages. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@40867 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-05-20envutil.rb: envutil in childnobu
* test/ruby/envutil.rb (assert_separately): require envutil in the child process too. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@40866 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-05-20test_objectspace.rb: run test_each_object separatelynobu
* test/ruby/test_objectspace.rb (TestObjectSpace#test_each_object): run separately. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@40849 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-05-20webrick: fix non-ascii escape bugsnobu
* lib/webrick/htmlutils.rb (WEBrick::HTMLUtils#escape): replace HTML meta chars even in non-ascii string. [Bug #8425] [ruby-core:55052] * lib/webrick/httputils.rb (WEBrick::HTTPUtils#{_escape,_unescape}): fix %-escape encodings. [Bug #8425] [ruby-core:55052] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@40848 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-05-19Default script encoding is now UTF-8naruse
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@40833 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-05-19* test/webrick/test_htmlutils.rb: add test for WEBrick::HTMLUtils.ayumin
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@40830 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-05-18* lib/uri/common.rb (URI.decode_www_form): scrub string if decodednaruse
bytes are invalid for the encoding. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@40820 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-05-18* lib/set.rb (Set#delete_if, Set#keep_if): Make Set#delete_if andknu
Set#keep_if more space and time efficient by avoiding to_a. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@40819 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-05-18* string.c (str_scrub_bang): add String#scrub!. [Feature #8414]naruse
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@40810 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-05-18compile.c: forward kwrestnobu
* compile.c (iseq_compile_each): forward anonymous and first keyword rest argument one. [ruby-core:55033] [Bug #8416]. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@40807 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-05-18enumerator.c: use VALUEnobu
* enumerator.c (inspect_enumerator): use VALUE instead of mere char* by using rb_sprintf() and rb_id2str(). git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@40805 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-05-14* ext/psych/lib/psych.rb: Adding Psych.safe_load for loading a usertenderlove
defined, restricted subset of Ruby object types. * ext/psych/lib/psych/class_loader.rb: A class loader for encapsulating the logic for which objects are allowed to be deserialized. * ext/psych/lib/psych/deprecated.rb: Changes to use the class loader * ext/psych/lib/psych/exception.rb: ditto * ext/psych/lib/psych/json/stream.rb: ditto * ext/psych/lib/psych/nodes/node.rb: ditto * ext/psych/lib/psych/scalar_scanner.rb: ditto * ext/psych/lib/psych/stream.rb: ditto * ext/psych/lib/psych/streaming.rb: ditto * ext/psych/lib/psych/visitors/json_tree.rb: ditto * ext/psych/lib/psych/visitors/to_ruby.rb: ditto * ext/psych/lib/psych/visitors/yaml_tree.rb: ditto * ext/psych/psych_to_ruby.c: ditto * test/psych/helper.rb: ditto * test/psych/test_safe_load.rb: tests for restricted subset. * test/psych/test_scalar_scanner.rb: ditto * test/psych/visitors/test_to_ruby.rb: ditto * test/psych/visitors/test_yaml_tree.rb: ditto git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@40750 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-05-14* test/psych/helper.rb: envutil is not available outside Ruby, sotenderlove
port the functions from envutil to the test helper. * test/psych/test_deprecated.rb: ditto * test/psych/test_encoding.rb: ditto git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@40749 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-05-14* ext/dl/lib/dl/func.rb (DL::Function#call): check tainted whennagachika
$SAFE > 0. * ext/fiddle/function.c (function_call): check tainted when $SAFE > 0. * test/fiddle/test_func.rb (module Fiddle): add test for above. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@40728 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-05-13proc.c: Kernel#singleton_methodnobu
* proc.c (rb_obj_singleton_method): new method Kernel#singleton_method which returns a Method object of the singleton method. non-singleton method causes NameError, but not aliased or zsuper method, right now. [ruby-core:54914] [Feature #8391] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@40684 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-05-12fix a typokazu
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@40652 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-05-11* test/rinda/test_rinda.rb: Socket.getifaddrs may returns an interfaceakr
which #addr method returns nil for venet0 in OpenVZ. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@40645 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-05-11Add debug print to investigate a failure on Travis-CI.akr
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@40643 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-05-11Simplify test with Socket.getifaddrsnaruse
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@40642 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-05-11* ext/socket: New method, Socket.getifaddrs, implemented.akr
[ruby-core:54777] [Feature #8368] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@40639 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-05-11disable test_fcntl_lock_linux on x32.akr
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@40638 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-05-10parse.y: invalid name as mere stringnobu
* parse.y (parser_peek_variable_name): treat invalid global, class, and instance variable names as mere strings rather than errors. [ruby-core:54885] [Bug #8375] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@40635 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-05-10* test/dtrace/helper.rb: ignore empty SUDO. reuse SUDO value by usingnobu
class variable. use test/unit instead of minitest/autorun. dispose `Interrupted system call' error messages at parallel test. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@40630 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-05-10Fixed minitest dependency bug by removing env PARALLEL checks (no clue why ↵ryan
that was there). Exactly the same minitest code tho. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@40628 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-05-09* ext/socket/ancdata.c (bsock_sendmsg_internal): Always setakr
controls_num to raise NotImplementedError appropriately. (bsock_recvmsg_internal): Raise NotImplementedError if :scm_rights=>true is given on platforms which don't have 4.4BSD style control message. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@40624 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-05-08class.c: include modules onlynobu
* class.c (rb_mod_included_modules): should not include non-modules. [ruby-core:53158] [Bug #8025] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@40614 b2dd03c8-39d4-4d8f-98ff-823fe69b080e