aboutsummaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
...
* * lib/net/telnet.rb: gemify net-telnet.hsbt2015-05-213-763/+7
| | | | | | | [Feature #11083] * gems/bundled_gems: added net-telnet to bundled gems. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@50586 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * vm_method.c: Remove private attribute warning [Bug #10967]zzak2015-05-213-5/+12
| | | | | | | | | | Patch by @spastorino [Fixes GH-849] https://github.com/ruby/ruby/pull/849 * test/ruby/test_module.rb: Update test for changes git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@50585 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* digest.c: GC guardnobu2015-05-211-0/+3
| | | | | | | * ext/digest/digest.c (hexencode_str_new, rb_digest_base_update): prevent argument strings from GC. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@50580 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * proc.c (method_proc): rename to method_to_proc.ko12015-05-212-3/+7
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@50573 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* Fixes for grammar and style [ci skip]nobu2015-05-212-15/+20
| | | | | | | * io.c (rb_f_select): [DOC] Fixes for grammar and style. [Fix GH-906] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@50572 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* variable.c: generic_iv_tbl is unavoidablenormal2015-05-212-18/+15
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Even miniruby creates one generic ivar (plain "ruby" creates 9), so there's no point in lazily allocating the table. I dumped generic ivar counts with the following trivial patch: --- a/variable.c +++ b/variable.c @@ -24,6 +24,10 @@ static void check_before_mod_set(VALUE, ID, VALUE, const char *); static void setup_const_entry(rb_const_entry_t *, VALUE, VALUE, rb_const_flag_t); static int const_update(st_data_t *, st_data_t *, st_data_t, int); static st_table *generic_iv_tbl; +__attribute__((destructor)) static void count_genivar(void) +{ + fprintf(stderr, "genivars: %zu\n", (size_t)generic_iv_tbl->num_entries); +} void Init_var_tables(void) * variable.c (Init_var_tables): init generic_iv_tbl (rb_generic_ivar_table, generic_ivar_get, generic_ivar_set, generic_ivar_defined, generic_ivar_remove, rb_mark_generic_ivar, givar_i, rb_mark_generic_ivar_tbl, rb_free_generic_ivar, rb_copy_generic_ivar, rb_ivar_foreach, rb_ivar_count): remove checks for uninitialize generic_iv_tbl [ruby-core:69155] [Feature #11146] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@50569 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* vm.c: vm_invoke_bmethodnobu2015-05-202-9/+22
| | | | | | | * vm.c (vm_invoke_bmethod): bmethod does not need EXEC_TAG as it does not set safe level. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@50568 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * 2015-05-21svn2015-05-201-2/+2
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@50567 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * iseq.c (exception_type2symbol): show correct bug message.ko12015-05-202-1/+5
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@50566 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * lib/base64.rb: Fix rdoc-formatting for padding argument.mame2015-05-202-1/+6
| | | | | | [fix GH-905][ci skip] Patch by @davydovanton git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@50560 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* ruby.h: warn old namesnobu2015-05-202-2/+21
| | | | | | | * include/ruby/ruby.h (rb_data_typed_object_alloc), (rb_data_object_alloc): warn use of old names. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@50558 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* ruby.h: DEPRECATED_BYnobu2015-05-201-0/+3
| | | | | | | * include/ruby/ruby.h (DEPRECATED_BY): fallback definition without additional messages. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@50557 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* configure.in: DEPRECATED_BYnobu2015-05-202-1/+5
| | | | | | | * configure.in (DEPRECATED_BY): deprecate warning with preferable alternative. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@50556 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* configure.in: attribute argumentsnobu2015-05-202-6/+14
| | | | | | | * configure.in (RUBY_FUNC_ATTRIBUTE): allow attribute arguments in the macro. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@50555 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* configure.in: pop macronobu2015-05-201-1/+2
| | | | | | | * configure.in (RUBY_FUNC_ATTRIBUTE): pop definition of macro `attrib_code`. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@50554 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * vm_dump.c (rb_print_backtrace): return value of libexec's backtracenaruse2015-05-202-1/+6
| | | | | | is size_t, so simply cast as int. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@50553 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * 2015-05-20svn2015-05-201-2/+2
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@50552 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* added contributor namehsbt2015-05-201-1/+1
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@50551 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* ChangeLog: fix typonobu2015-05-191-1/+1
| | | | | | | * ChangeLog: fix typo, "srouce" to "source". [ruby-core:69219] [Bug #11159] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@50542 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* iseq.c: check srouce typenobu2015-05-193-0/+13
| | | | | | | * iseq.c (rb_iseq_compile_with_option): check srouce type, must be an IO or a String. [ruby-core:69219] [Bug #11159] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@50541 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * lib/benchmark.rb: Update Benchmark documentation and formatting.hsbt2015-05-192-6/+24
| | | | | | [fix GH-903][ci skip] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@50540 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* numeric.c: return truenobu2015-05-191-3/+3
| | | | | | | * numeric.c (num_positive_p): return true instead of Fixnum 0. [ruby-core:69173] [Feature #11151] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@50539 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* numeric.c: Bignum 0 is not positivenobu2015-05-193-1/+19
| | | | | | | | * numeric.c (num_positive_p): should false on Bignum 0. http://twitter.com/rafaelfranca/status/600509783427391488 [ruby-core:69173] [Feature #11151] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@50538 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * lib/uri/rfc2396_parser.rb (initialize_pattern):naruse2015-05-193-1/+13
| | | | | | | | | URI::Generic.build should accept port as a string. pattern[:PORT] is not defined for long. by Dave Slutzkin <daveslutzkin@fastmail.fm> https://github.com/ruby/ruby/pull/804 fix GH-804 git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@50537 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* ruby.h: add old namesnobu2015-05-193-0/+22
| | | | | | | | | | * include/ruby/ruby.h (rb_data_typed_object_alloc), (rb_data_object_alloc): add old names for source level backward compatibilities. * gc.c (rb_data_object_alloc, rb_data_typed_object_alloc): add aliases for binary level backward compatibilities. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@50536 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* ruby.h: cast for C++nobu2015-05-192-1/+8
| | | | | | | * include/ruby/ruby.h (Data_Make_Struct0): needs function pointer casts to fix function overloading in C++. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@50535 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * 2015-05-19svn2015-05-191-2/+2
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@50534 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* ruby.h: cast for C++nobu2015-05-192-8/+14
| | | | | | | | * include/ruby/ruby.h (Data_Make_Struct0, TypedData_Make_Struct0): explicit cast from void* is necessary as implicit cast is disallowed in C++. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@50533 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* fix a typo [ci skip]kazu2015-05-181-1/+1
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@50532 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* nonblock.c: just yield if the flag is not changednobu2015-05-181-4/+6
| | | | | | | | | | * ext/io/nonblock/nonblock.c (io_nonblock_set): return whether nonblock flag was changed. * ext/io/nonblock/nonblock.c (rb_io_nonblock_block): nothing to restore but just yield unless nonblock flag is changed. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@50531 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* test_nonblock.rb: refine failure messagenobu2015-05-181-1/+1
| | | | | | | * test/socket/test_nonblock.rb (test_accept_nonblock): refine assertion for better failure message. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@50530 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* test_autoload.rb: use class_evalnobu2015-05-181-10/+2
| | | | | | | | | * test/ruby/test_autoload.rb (add_autoload): use class_eval instead of string eval. * test/ruby/test_autoload.rb (remove_autoload_constant): ditto. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@50529 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* gc.c: remove ifdefnobu2015-05-181-33/+31
| | | | | | * gc.c (obj_info): remove needless ifdef, and adjust indent. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@50528 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* intern.h: rb_f_notimplement for ext on Windowsnobu2015-05-184-0/+17
| | | | | | | | | * include/ruby/intern.h (rb_f_notimplement): should not respond to not-implemented methods. as the address inside a DLL and the imported address are different on Windows, use an exported variable to share the same address. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@50527 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * 2015-05-18svn2015-05-181-2/+2
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@50526 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * lib/monitor.rb (mon_try_enter, mon_enter): should reset @mon_countshugo2015-05-183-0/+40
| | | | | | | just in case the previous owner thread dies without mon_exit. [fix GH-874] Patch by @chrisberkhout git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@50525 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* notimplement: renamenobu2015-05-174-4/+4
| | | | | | | * ext/-test-/notimplement, test/-ext-/test_notimplement.rb: rename from bug-3662. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@50524 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* lib/webrick/utils.rb: simplify by avoiding fcntlnormal2015-05-172-9/+9
| | | | | | | | | | | | | | | | IO#nonblock= and IO#close_on_exec= methods are simpler-to-use and potentially more portable to for future OSes. IO#nonblock= and IO#close_on_exec= are also smart enough to avoid redundantly setting flags so a syscall may be avoided. These methods could probably be removed entirely and inlined, but it's unclear if there is 3rd-party code which relies on them. * lib/webrick/utils.rb (set_non_blocking): use IO#nonblock= * (set_close_on_exec): use IO#close_on_exec= [Feature #11136] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@50523 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* numeric.c: Numeric#positive? and Numeric#negative?nobu2015-05-178-0/+163
| | | | | | | | | | | | * numeric.c (num_positive_p, num_negative_p): add methods Numeric#positive? and Numeric#negative?. [ruby-core:69173] [Feature #11151] * numeric.c (flo_positive_p, flo_negative_p): specialiazed functions for Float. * complex.c (Init_Complex): Complex do not have positive? and negative? methods git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@50522 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* test_numeric.rb: separate dummy classesnobu2015-05-171-87/+35
| | | | | | | * test/ruby/test_numeric.rb: use separate dummy classes for each test cases. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@50521 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* numeric.c: compare_with_zeronobu2015-05-171-2/+13
| | | | | | | * numeric.c (compare_with_zero): raise TypeError when not comparable with 0. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@50520 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* lib/webrick/server.rb: avoid redundant fcntl callnormal2015-05-172-1/+5
| | | | | | | | | | Sockets are close-on-exec by default since Ruby 2.0, so it is redundant to set it again. * lib/webrick/server.rb (accept_client): avoid redundant fcntl call [Feature #11137] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@50519 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* ext/socket/init.c: use SOCK_NONBLOCK if availablenormal2015-05-173-4/+31
| | | | | | | | | | | | | | | | | | | This saves a system call by allowing us to use SOCK_NONBLOCK in Linux when accept4 is available. Note: I do not agree accept_nonblock should always make accepted sockets non-blocking, and will propose a future API to allow controlling whether accepted sockets are non-blocking or not regardless of how they were created. * ext/socket/init.c (cloexec_accept): support nonblock flag and use SOCK_NONBLOCK if possible * ext/socket/init.c (rsock_s_accept_nonblock): update cloexec_accept call * ext/socket/init.c (accept_blocking): ditto for blocking * test/socket/test_nonblock.rb: check nonblock? on accepted socket [Feature #11138] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@50518 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* default colorsnobu2015-05-174-3/+24
| | | | | | | * bootstraptest/runner.rb, sample/test.rb, test/lib/test/unit.rb: shared the default colors from test/colors file. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@50517 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* reset colorsnobu2015-05-173-7/+7
| | | | | | | * bootstraptest/runner.rb, sample/test.rb, test/lib/test/unit.rb: reset for each colors. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@50516 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * load.c (loaded_feature_path): stop returning false negatives fortenderlove2015-05-163-1/+36
| | | | | | | | | | filenames which are trailing substrings of file extensions. For example, 'b', which a trailing substring of ".rb" should not return false. [Bug #11155][ruby-core:69206] * test/ruby/test_autoload.rb: test for fix git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@50515 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * 2015-05-17svn2015-05-161-2/+2
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@50514 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* fix test failures introduced in r50494tenderlove2015-05-161-7/+13
| | | | | | | | | | | This commit changes some of the `require` tests to run *without* rubygems enabled. Those particular tests were removing rubygems from $LOAD_PATH. These tests assert that a `LoadError` is raised. Unfortunately, since RubyGems was enabled by default and was not fully loaded, the load error actually originated from RubyGems, *not* from where the tests intended. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@50513 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* ifaddr.c: wrapper object before allocnobu2015-05-161-4/+11
| | | | | | | | * ext/socket/ifaddr.c (rsock_getifaddrs): make wrapper object before result structs allocation and manage refcount for each elements to get rid of potential memory leak. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@50512 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* allocate structs with wrappernobu2015-05-164-24/+12
| | | | | | | | | | | | | | * parse.y (rb_parser_new, ripper_s_allocate): allocate structs with making new wrapper objects and get rid of potential memory leak. * variable.c (rb_autoload): ditto. * ext/digest/digest.c (rb_digest_base_alloc): ditto. * ext/strscan/strscan.c (strscan_s_allocate): ditto. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@50511 b2dd03c8-39d4-4d8f-98ff-823fe69b080e