summaryrefslogtreecommitdiff
Commit message (Collapse)AuthorAgeFilesLines
* label as lvalue is a GCCismshyouhei2018-01-022-6/+5
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@61558 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* statement experssion is a GCCismshyouhei2018-01-023-12/+12
| | | | | | should mark as such. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@61557 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* enum value grater than int is a GCCismshyouhei2018-01-021-4/+4
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@61556 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* _Static_assert is a C11ismshyouhei2018-01-021-1/+3
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@61555 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* bit-fields other than int is a C99ismshyouhei2018-01-024-12/+37
| | | | | | | To be precise C90 says "A bit-field may have type int, unsigned int, or signed int". It is clear that char or enum are NG. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@61554 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* initializer paren-string `{("str")}` is a C99ismshyouhei2018-01-021-1/+1
| | | | | | | | | | | First, `"str"` is a string constant but `("str")` is not. It is a random expression whose type happen to be const char*. Second, non-constant initializer element is forbidden in C90. Mixture of these two results in the fact that `{("str")}` is a C99ism. Just delete the parens and everything goes well. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@61553 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* string literal longer than 509 characters is a C99ismshyouhei2018-01-021-0/+8
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@61552 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* flexible array member is a C99ismshyouhei2018-01-021-1/+3
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@61551 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* long long is a C99ismshyouhei2018-01-023-2/+14
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@61550 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* comma at the end of enum is a C99ismshyouhei2018-01-021-2/+2
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@61549 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* __VA_ARGS__ is a C99ismshyouhei2018-01-022-3/+3
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@61548 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* long long is a C99simshyouhei2018-01-021-3/+8
| | | | | | Don't assume 8-bytes integers == "long long". git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@61547 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* string literal longer than 509 characters is a C99ismshyouhei2018-01-021-0/+6
| | | | | | Should avoid such thing. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@61546 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* "%z" printf format specifier is a C99ismshyouhei2018-01-021-2/+3
| | | | | | PRIxSIZE is also. But shimmed in ruby.h git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@61545 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* int (*)(void) is incompatible with void*shyouhei2018-01-021-1/+2
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@61544 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* rb_insn_func_t is incompatible with void*shyouhei2018-01-021-1/+1
| | | | | | Why not just use void* ? git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@61543 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* explicit cast to void* required for %pshyouhei2018-01-029-24/+24
| | | | | | | These functions take variadic arguments so no automatic type promotion is expected. You have to do it by hand. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@61542 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* suppress warning for clangshyouhei2018-01-021-0/+7
| | | | | | | | | In this function, "volatile" is specified twice in macro-expanded `VAR_INITIALIZED(cont)` part. That is a problem in fact. However I don't want to touch this line because it is already a messy workaround for clang SEGV. Let me just ignore. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@61541 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* parse.y: fix typonobu2018-01-021-2/+2
| | | | | | * parse.y (singleton): fix typo, show the expression. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@61540 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * 2018-01-02svn2018-01-021-1/+1
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@61539 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* parse.y: code end positionnobu2018-01-022-1/+7
| | | | | | | * parse.y (parser_yyerror): use the given location as the end of erred code, instead of the current position. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@61538 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* vm_core.h: make the algorithm of get_insn_info selectablemame2018-01-012-7/+32
| | | | | | | | Currently, VM_INSN_INFO_TABLE_IMPL == 0 means linear search, and VM_INSN_INFO_TABLE_IMPL == 1 means binary search. I plan to add succinct bitvector algorithm later. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@61537 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* iseq.h: Extract position array from iseq_insn_info_entrymame2018-01-014-42/+65
| | | | | | | | | | This makes TracePoint a bit fast by reducing cache misses of `get_insn_info_binary_search`. Also, I plan to use succinct bitvector algorithm for `get_insn_info` instead of binary search. This change will make it easy. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@61536 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* iseq.c: fix build error when VM_CHECK_MODE is enabledmame2018-01-011-1/+1
| | | | | | Follow up of r61534. Sorry. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@61535 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* vm_core.h: refactoring of insns_infomame2018-01-013-19/+21
| | | | | | | This factors rb_iseq_constant_body#insns_info and #insns_info_size to struct iseq_insn_info. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@61534 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* parse.y: highlight yyerrornobu2018-01-011-15/+35
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@61533 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* [DOC] doc/NEWS-2.5.0: remove trailing comma [ci skip]kazu2018-01-011-2/+1
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@61532 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* Removed debug code. It is inconsistency in rubygems upsteream.hsbt2017-12-311-33/+1
| | | | | | Revert r58657, r58660, r58692, r58723. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@61531 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* parse.y: yyerror1nobu2017-12-311-27/+36
| | | | | | * parse.y (yyerror1): pass location to parser_yyerror. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@61530 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * 2018-01-01svn2017-12-311-3/+3
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@61529 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* parse.y: yylloc at yyerrornobu2017-12-311-9/+13
| | | | | | | * parse.y (parser_yyerror): consider the case first_loc and last_loc point different lines. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@61528 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* error.c: limit depthnobu2017-12-311-3/+5
| | | | | | | * error.c (rb_warn_m): limit backtrace depth to reduce objects to be created but not used. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@61527 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* test_exception.rb: more assertionsnobu2017-12-311-0/+5
| | | | | | [ruby-core:84568] [Bug #14262] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@61526 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* error.c: negative uplevelnobu2017-12-312-1/+6
| | | | | | | * error.c (rb_warn_m): negative uplevel is not allowed. [ruby-core:84568] [Bug #14262] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@61525 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* prelude.c.tmpl: get rid of warnings on old gccnobu2017-12-311-2/+2
| | | | | | | | * template/prelude.c.tmpl: ignore missing-field-initializers on old gcc, e.g. 4.4, which does not support pushing/popping diagnostics. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@61524 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* parse.y: assignable_errornobu2017-12-312-10/+10
| | | | | | | * parse.y (assignable_gen): should return valid NODE always even on errors. [ruby-core:84565] [Bug #14261] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@61523 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* parse.y: yylloc at yyerrornobu2017-12-311-8/+21
| | | | | | * parse.y (parser_yyerror): utilize the location given by bison. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@61522 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* fix reset order.ko12017-12-311-2/+2
| | | | | | | | | | | | | | | | * lib/rdoc/test_case.rb (setup): call `RDoc::Markup::PreProcess.reset` at the end of `setup` method. `RDoc::RDoc.new` requires `rdoc/generator/darkfish` and requires `rdoc/tom_doc.rb` at last. It add post_proecssor (at `add_post_processor`) and it fails `TestRDocMarkupPreProcess#test_class_post_process`. This issue occured only with sorted tests by alphabetical order. `make test-all TESTS='rdoc/test_rdoc_markup_pre_process.rb --test-order=alpha`) We can observe this failure with parallel test only a few times. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@61521 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* increase test timeout.ko12017-12-301-1/+1
| | | | | | | * test/ruby/test_thread.rb (test_signal_at_join): increase timeout. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@61520 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * 2017-12-31svn2017-12-301-1/+1
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@61519 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* bit fields treating negative values should be declared as signed intngoto2017-12-301-2/+2
| | | | | | | | | | | * internal.h (struct vm_ifunc_argc): Bit fields are unsigned by default. For storing nagative values to bit fields, they must be declated as signed int. Fix multiple test failure observed by 32-bit binaries compiled with Oracle Developer Studio (Solaris Studio) 12.x on Solaris 10 on sparc architecture. [Bug #14260] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@61518 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* numeric.c: Fix Integer#pow with a large Fixnum modulomrkn2017-12-302-1/+8
| | | | | | | | | * numeric.c: Fix Integer#pow with a large Fixnum modulo [Bug #14259] [ruby-core:84562] * test/ruby/test_numeric.rb: add assertions for reproducing this bug. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@61517 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* drb: use \A and \znobu2017-12-304-8/+14
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@61516 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * 2017-12-30svn2017-12-301-1/+1
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@61515 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* hash literal deduplicates like Hash#[]=normal2017-12-304-11/+21
| | | | | | | | | | | | | From: Eric Wong <e@80x24.org> * hash.c (rb_hash_key_str): new function (hash_aset_str): use rb_hash_key_str * internal.h: add rb_hash_key_str * st.c (st_stringify): use rb_hash_key_str * test/ruby/test_hash.rb (test_NEWHASH_fstring_key): dynamic key [ruby-core:84554] [Feature #14258] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@61514 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* string.c: chomp rs at the endnobu2017-12-292-1/+10
| | | | | | | | | * string.c (rb_str_enumerate_lines): should chomp record separator only, but not a newline, at the end of the receiver as well as middle, if the separator is given. [ruby-core:84552] [Bug #14257] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@61513 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* test/ruby/test_hash: minor test cleanupnormal2017-12-291-4/+4
| | | | | | | | | Prep work for proposed behavior change: https://bugs.ruby-lang.org/issues/14225 * test/ruby/test_hash.rb (test_tainted_string_key): assert_predicate git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@61512 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * 2017-12-29svn2017-12-281-1/+1
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@61511 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* `$SAFE` as a process global state. [Feature #14250]ko12017-12-2833-118/+158
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * vm_core.h (rb_vm_t): move `rb_execution_context_t::safe_level` to `rb_vm_t::safe_level_` because `$SAFE` is a process (VM) global state. * vm_core.h (rb_proc_t): remove `rb_proc_t::safe_level` because `Proc` objects don't need to keep `$SAFE` at the creation. Also make `is_from_method` and `is_lambda` as 1 bit fields. * cont.c (cont_restore_thread): no need to keep `$SAFE` for Continuation. * eval.c (ruby_cleanup): use `rb_set_safe_level_force()` instead of access `vm->safe_level_` directly. * eval_jump.c: End procs `END{}` doesn't keep `$SAFE`. * proc.c (proc_dup): removed and introduce `rb_proc_dup` in vm.c. * safe.c (rb_set_safe_level): don't check `$SAFE` 1 -> 0 changes. * safe.c (safe_setter): use `rb_set_safe_level()`. * thread.c (rb_thread_safe_level): `Thread#safe_level` returns `$SAFE`. It should be obsolete. * transcode.c (load_transcoder_entry): `rb_safe_level()` only returns 0 or 1 so that this check is not needed. * vm.c (vm_proc_create_from_captured): don't need to keep `$SAFE` for Proc. * vm.c (rb_proc_create): renamed to `proc_create`. * vm.c (rb_proc_dup): moved from proc.c. * vm.c (vm_invoke_proc): do not need to set and restore `$SAFE` for `Proc#call`. * vm_eval.c (rb_eval_cmd): rename a local variable to represent clearer meaning. * lib/drb/drb.rb: restore `$SAFE`. * lib/erb.rb: restore `$SAFE`, too. * test/lib/leakchecker.rb: check `$SAFE == 0` at the end of tests. * test/rubygems/test_gem.rb: do not set `$SAFE = 1`. * bootstraptest/test_proc.rb: catch up this change. * spec/ruby/optional/capi/string_spec.rb: ditto. * test/bigdecimal/test_bigdecimal.rb: ditto. * test/fiddle/test_func.rb: ditto. * test/fiddle/test_handle.rb: ditto. * test/net/imap/test_imap_response_parser.rb: ditto. * test/pathname/test_pathname.rb: ditto. * test/readline/test_readline.rb: ditto. * test/ruby/test_file.rb: ditto. * test/ruby/test_optimization.rb: ditto. * test/ruby/test_proc.rb: ditto. * test/ruby/test_require.rb: ditto. * test/ruby/test_thread.rb: ditto. * test/rubygems/test_gem_specification.rb: ditto. * test/test_tempfile.rb: ditto. * test/test_tmpdir.rb: ditto. * test/win32ole/test_win32ole.rb: ditto. * test/win32ole/test_win32ole_event.rb: ditto. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@61510 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* proc.c: empty iseq namesnobu2017-12-281-1/+4
| | | | | | | * proc.c (proc_binding): unified the name and realpath of an empty iseq. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@61509 b2dd03c8-39d4-4d8f-98ff-823fe69b080e