summaryrefslogtreecommitdiff
AgeCommit message (Collapse)Author
2015-07-24string.c: pool only bare strings in fstringnobu
* string.c (fstr_update_callback): pool bare strings only. * string.c (rb_fstring): return the original string with sharing a fstring if it has extra attributes, not the fstring itself. [ruby-dev:49188] [Bug #11386] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@51360 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-07-24Add tests for `File.extname`nobu
* file.c (rb_file_s_extname): [DOC] add an example. * test/ruby/test_path.rb (test_extname): add tests. [Fix GH-978] * path starts with dot ('.a.rb') * path includes dir name ('a/b/d/test.rb') * path includes dir name and dir name starts with dot ('.a/b/d/test.rb') git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@51359 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-07-23* remove trailing spaces.svn
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@51358 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-07-23* vm_core.h: constify rb_iseq_constant_body::local_table andko1
rb_iseq_param_keyword::table and rb_iseq_param_keyword::default_values. * compile.c: catch up this fix. * iseq.c: ditto. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@51357 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-07-23* vm_core.h: constify rb_iseq_constant_body::iseq_encoded andko1
rb_control_frame_t::pc. * compile.c (rb_iseq_translate_threaded_code): catch up this fix. * iseq.c: ditto. * vm_exec.c (vm_exec_core): ditto. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@51356 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-07-23string.c: new string for fake stringnobu
* string.c (fstr_update_callback): create new string for fake string, and pool shared target unless substring. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@51355 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-07-23string.c: trivial optimizationsnobu
* string.c (rb_str_new_frozen, str_make_independent_expand): trivial peephole optimizations. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@51354 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-07-23string.c: taint flagsnobu
* include/ruby/ruby.h: add raw FL macros, which assume always the argument object is not a special constant. * internal.h (STR_EMBED_P, STR_SHARED_P): valid only for T_STRING. * string.c: deal with taint flags directly across String instances. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@51353 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-07-23string.c: str_shared_replacenobu
* string.c (str_shared_replace): split from rb_str_shared_replace without argument check. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@51352 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-07-23ossl_ssl.c: suppress warningsnobu
* ext/openssl/ossl_ssl.c (ossl_sslctx_setup): fix argument types to suppress shorten-64-to-32 and shorten-64-to-32 warnings. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@51351 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-07-23parse.y: pop cmdargnobu
* parse.y (lambda_body): pop cmdarg stack for lookahead token. [ruby-core:70067] [Bug #11380] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@51350 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-07-22fix tests bu not setting the string instance on the frozen objecttenderlove
OpenSSL [copies the string returned by the pointe](https://github.com/openssl/openssl/blob/9f040d6decca7930e978784c917f731e5c45e8f0/ssl/t1_lib.c#L1800-1809), so it should be safe to just return a pointer to the string object and not set an instance variable on the already frozen object. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@51349 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-07-22* ext/openssl/ossl_ssl.c: add ECDH callback support. [Feature #11356]tenderlove
* test/openssl/test_pair.rb: test for ECDH callback support git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@51348 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-07-22* ext/openssl/ossl_ssl.c: add ALPN support. [Feature #9390]tenderlove
* ext/openssl/extconf.rb: detect ALPN support in OpenSSL * test/openssl/test_ssl.rb: test for ALPN git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@51347 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-07-22* 2015-07-23svn
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@51346 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-07-22fix typos [ci skip]kazu
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@51345 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-07-22string.c: fix coderange of reversenobu
* string.c (rb_str_reverse): reversed string is not a substring, and should not set coderange of the original string. [ruby-dev:49189] [Bug #11387] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@51344 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-07-22* ChangeLog: fix a typo for r51324. [ci skip]nagachika
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@51343 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-07-22ruby.h: ASSUMEnobu
* include/ruby/ruby.h (ASSUME): hint for optimization, the expression is assumed to be true always. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@51342 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-07-22* vm_core.h: modify layout of rb_iseq_constant_body.ko1
Move frequent accesssing fields to upper part. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@51341 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-07-22* vm_core.h: remove unused declaration ofko1
iseq_compile_data_ensure_node_stack. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@51340 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-07-22* vm_core.h: separate rb_iseq_body into rb_iseq_constant_body andko1
rb_iseq_variable_body (rb_iseq_t::variable_body). rb_iseq_variable_body can be modified after compilation. * compile.c: use rb_iseq_t::variable_body. * iseq.c: ditto. * thread.c: ditto. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@51339 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-07-22* test/webrick/test_utils.rb (TestWEBrickUtils#test_nested_timeout_outer): seemsusa
to be too short for mswin CI. fixed occasional failure introduced at r51235. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@51338 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-07-22* lib/matrix/eigenvalue_decomposition.rb: refine code style.hsbt
[fix GH-959][ci skip] Patch by @bogdanvlviv git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@51337 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-07-22common.mk: fix execnobu
* common.mk: fix macro name, exec but not EXEC. pointed by @nagachika. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@51336 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-07-22* test/ruby/test_range.rb: Add test case for Range#end withhsbt
exclude_end true case. [fix GH-968] Pach by @yui-knk git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@51335 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-07-22fix doc for Numeric#coerce [ci skip]nobu
* numeric.c (num_coerce): [DOC] fix doc for Numeric#coerce, missing '+'. [Fix GH-974] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@51334 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-07-22Makefile.in: PIC lex.cnobu
* Makefile.in (lex.c): make position independent table. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@51333 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-07-22parse.y: call rb_intern2nobu
* parse.y (parse_ident): call rb_intern2 with the known length instead of strlen(). git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@51332 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-07-22common.mk: add execnobu
* common.mk: add exec to quoted commands. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@51331 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-07-22thread.c: return the errornobu
* thread.c (rb_wait_for_single_fd): return the error when ppoll failed. fix r51319. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@51330 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-07-21follow r51064naruse
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@51329 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-07-21suppress warningsnaruse
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@51328 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-07-21* make rb_iseq_t T_IMEMO object (type is imemo_iseq).ko1
All contents of previous rb_iseq_t is in rb_iseq_t::body. Remove rb_iseq_t::self because rb_iseq_t is an object. RubyVM::InstructionSequence is wrapper object points T_IMEMO/iseq. So RubyVM::ISeq.of(something) method returns different wrapper objects but they point the same T_IMEMO/iseq object. This patch is big, but most of difference is replacement of iseq->xxx to iseq->body->xxx. (previous) rb_iseq_t::compile_data is also located to rb_iseq_t::compile_data. It was moved from rb_iseq_body::compile_data. Now rb_iseq_t has empty two pointers. I will split rb_iseq_body data into static data and dynamic data. * compile.c: rename some functions/macros. Now, we don't need to separate iseq and iseqval (only VALUE). * eval.c (ruby_exec_internal): `n' is rb_iseq_t (T_IMEMO/iseq). * ext/objspace/objspace.c (count_imemo_objects): count T_IMEMO/iseq. * gc.c: check T_IMEMO/iseq. * internal.h: add imemo_type::imemo_iseq. * iseq.c: define RubyVM::InstructionSequnce as T_OBJECT. Methods are implemented by functions named iseqw_.... * load.c (rb_load_internal0): rb_iseq_new_top() returns rb_iseq_t (T_IMEMO/iesq). * method.h (rb_add_method_iseq): accept rb_iseq_t (T_IMEMO/iseq). * vm_core.h (GetISeqPtr): removed because it is not T_DATA now. * vm_core.h (struct rb_iseq_body): remove padding for [Bug #10037][ruby-core:63721]. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@51327 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-07-21* ext/objspace/objspace.c (total_i): no need to skip singleton classes.ko1
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@51326 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-07-21* vm_core.h: constify rb_call_info_t::kw_arg,ko1
rb_control_frame_t::iseq and rb_control_frame_t::block_iseq. * iseq.c (iseq_free): catch up this fix. * vm.c: ditto. * vm_dump.c: ditto. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@51325 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-07-21fix ChangeLogko1
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@51324 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-07-21* vm_core.h: constify rb_call_info_t::blockiseq and rb_iseq_t::iseq.ko1
* vm.c, vm_insnhelper.c: catch up this fix. * iseq.c (iseq_data_to_ary): constify the first iseq parameter. * vm_insnhelper.c (vm_make_proc_with_iseq): ditto. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@51323 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-07-21* method.h: constify rb_method_iseq_t::iseqptr.ko1
* proc.c (rb_method_entry_min_max_arity): catch up this fix. * vm_insnhelper.c (def_iseq_ptr): constify. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@51322 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-07-21* 2015-07-22svn
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@51321 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-07-21* gc.c (internal_object_p): Now a singleton classes appear byko1
ObjectSpace.each_object. [Bug #11360] * test/ruby/test_objectspace.rb: add a test about it. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@51320 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-07-21thread.c: refactor a loopnobu
* thread.c (do_select): replace switch and goto with a loop to suppress maybe-uninitialized warnings by gcc6. * thread.c (set_unblock_function, rb_wait_for_single_fd): ditto. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@51319 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-07-21* test/ruby/test_range.rb: Add test for Range#hashhsbt
[fix GH-969] Patch by @yui-knk git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@51318 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-07-21Makefile.sub: UNREACHABLEnobu
* win32/Makefile.sub (config.h): define UNREACHABLE by __assume. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@51317 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-07-21console.c: undefined vknobu
* ext/io/console/console.c (console_key_pressed_p): raise undefined virtual key code. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@51316 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-07-21cont.c: CreateFiberEx fallbacknobu
* cont.c (fiber_initialize_machine_stack_context): fallback definition of CreateFiberEx for VC6. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@51315 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-07-21win32.c: symlink constants fallbacknobu
* win32/win32.c (rb_w32_wreadlink): define symlink constants for VC6. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@51314 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-07-21ruby/missing.h: M_PI fallback definitionnobu
* include/ruby/missing.h (M_PI, M_PI_2): fallback definitions for VC6. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@51313 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-07-21ruby/win32.h: include windows.hnobu
* include/ruby/win32.h: include windows.h before winsock2.h, because mswsock.h included by the former uses SOCKET defined after it in the latter. fix a build failure with VC6. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@51312 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-07-21* compile.c: constify the first parameter (iseq).ko1
* iseq_add_mark_object() * iseq_add_mark_object_compile_time() * iseq.c, iseq.h (rb_iseq_add_mark_object): ditto. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@51311 b2dd03c8-39d4-4d8f-98ff-823fe69b080e