in rational.c to refer canonicalization state for mathn support.
[ruby-core:41575] [Bug #5736]
* numeric.c (num_quo): ditto.
* test/test_mathn.rb: add a test for the change at r41109.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@41132 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
rational. [ruby-core:41575] [Bug #5736]
* test/ruby/test_numeric.rb: add a test for the above change.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@41109 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
ascii_only? on a result string returns the correct value.
[ruby-core:55315] [Bug #8496]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@41092 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
of figures. Patch by Vipul A M <vipulnsward@gmail.com>.
https://github.com/ruby/ruby/pull/323 fix GH-323
* test/bigdecimal/test_bigdecimal_util.rb: fix for the above change.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@41058 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* lib/fileutils.rb (FileUtils.rmdir): use remove_tailing_slash.
* test/fileutils/test_fileutils.rb: test for above.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@41052 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* test/fileutils/test_fileutils.rb: add test for above change.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@41047 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
tool/transcode-tblgen.rb: change EUC-JP-2004 to EUC-JIS-2004.
This is follow up to changes in r41024.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@41035 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
utilizing super returning self, and add tests while at it.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@41022 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* compile.c (iseq_set_arguments): not a simple single argument if any
keyword arguments exist. [ruby-core:55203] [Bug #8463]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@41021 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* vm_insnhelper.c (vm_yield_setup_block_args): split single parameter
if any keyword arguments exist, and then extract keyword arguments.
[ruby-core:55203] [Bug #8463]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@41020 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Use Socket::Option#ip_multicast_loop and Socket::Option#ip_multicast_ttl
instead of Socket::Option#int because NetBSD's size is byte though
others' is int.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@41010 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
whose value's is byte.
* ext/socket/option.c (sockopt_byte): getter for above.
* ext/socket/option.c (inspect_byte): inspect for above.
* ext/socket/option.c (sockopt_s_ip_multicast_loop): constructor of
the sockopt whose optname is IP_MULTICAST_LOOP.
* ext/socket/option.c (sockopt_ip_multicast_loop): getter for above.
* ext/socket/option.c (sockopt_s_ip_multicast_ttl): constructor of
the sockopt whose optname is IP_MULTICAST_TTL.
* ext/socket/option.c (sockopt_ip_multicast_ttl): getter for above.
* ext/socket/option.c (sockopt_inspect): use above.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@41009 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
vm_callee_setup_arg_complex): consider a hash argument for keyword
only when the number of arguments is more than the expected
mandatory parameters. [ruby-core:53199] [ruby-trunk - Bug #8040]
* test/ruby/test_keyword.rb: update a test for above.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@40992 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
"[ruby-core:55182] [ruby-trunk - Bug #8456][Open] Sugfault in Ruby Head"
Care about the case TracePoint#path #=> `nil'.
* ext/objspace/object_tracing.c: add two new methods:
* ObjectSpace.allocation_class_path(o)
* ObjectSpace.allocation_method_id(o)
They are not useful for Object.new because they are always
"Class" and :new.
To trace more useful information, we need to maintain call-tree
using call/return hooks, which is implemented by
ll-prof <http://sunagae.net/wiki/doku.php?id=software:llprof>
* test/objspace/test_objspace.rb: add a test.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@40974 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* 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
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
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
* 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
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
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
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
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
* 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
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