summaryrefslogtreecommitdiff
AgeCommit message (Collapse)Author
2017-02-24securerandom: fix up r57384rhe
SecureRandom.gen_random_openssl still refers to Random.raw_seed, which is renamed to Random.urandom by r57384. [Bug #9569] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@57707 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-02-24Integer.sqrt argument checknobu
* numeric.c (rb_int_s_isqrt): check if the argument is an integer. [Feature #13219] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@57706 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-02-24Integer.sqrt [Feature #13219]nobu
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@57705 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-02-24Update maintainers and standard library docs for GDBM.hsbt
[Feature #13248][ruby-core:79742] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@57704 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-02-24Update rdoc-5.1.0hsbt
* Details of changes are following url. https://github.com/rdoc/rdoc/blob/master/History.rdoc#510--2017-02-24 git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@57703 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-02-24gem name should be the downcase.hsbt
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@57702 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-02-24Added initial gemspec for GDBM module.hsbt
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@57701 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-02-24Update psych-2.2.3hsbt
* It's only typo fix for CRuby. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@57700 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-02-24* 2017-02-24svn
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@57699 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-02-24string.c (str_uminus): deduplicate stringsnormal
This exposes the rb_fstring internal function to return a deduped and frozen string when a non-frozen string is given. This is useful for writing all sorts of record processing key values maybe stored, but certain keys and values are often duplicated at a high frequency, so memory savings can noticeable. Use cases are many: * email/NNTP header processing There are some standard header keys everybody uses (From/To/Cc/Date/Subject/Received/Message-ID/References/In-Reply-To), as well as common ones specific to a certain lists: (ruby-core has X-Redmine-* headers) It is also useful to dedupe values, as most inboxes have multiple messages from the same sender, or MUA. * package management systems - things like RubyGems stores identical strings for licenses, dependency names, author names/emails, etc * HTTP headers/trailers - standard headers (Host/Accept/Accept-Encoding/User-Agent/...) are common, but there are also uncommon ones. Values may be deduped, as well, as it is likely a user agent will make multiple/parallel requests to the same server. * version control systems - this can be useful for deduplicating names of frequent committers (like "nobu" :) In linux.git and git.git, there are also common trailers such as Signed-Off-By/Acked-by/Reviewed-by/Fixes/... as well as less common ones. * audio metadata - There are commonly used tags (Artist/Album/Title/Tracknumber), but Vorbis comments allows arbitrary key values to be stored. Music collections contain songs by the same artist or mutiple songs from the same album, so deduplicating values will be helpful there, too. * JSON, YAML, XML, HTML processing Certain fields, tags and attributes are commonly used across the same and multiple documents There is no security concern in this being a DoS vector by causing immortal strings. The fstring table is not a GC-root and not walked during the mark phase. GC-able dynamic symbols since Ruby 2.2 are handled in the same manner, and that implementation also relies on the non-immortality of fstrings. [Feature #13077] [ruby-core:79663] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@57698 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-02-23appveyor.yaml: matrixnobu
* appveyor.yaml: use build matrix for platforms and compilers. resolve hard coded paths from these variables. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@57697 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-02-23bignum.c: NAIVE_MUL_DIGITSnobu
* bignum.c (NAIVE_MUL_DIGITS): share threshold for bary_sq_fast between bary_mul and bigsq. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@57696 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-02-23fix circular dependenciesnobu
* defs/gmake.mk (TEST_DEPENDS): remove targets expanded as TEST_TARGETS, to get rid of circular dependencies. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@57695 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-02-23Revert r57690 except for read_nonblocknobu
https://github.com/ruby/ruby/pull/1527#issuecomment-281867551 git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@57694 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-02-23[DOC] mark up literalsnobu
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@57693 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-02-23[DOC] keyword argument _exception_nobu
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@57692 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-02-23socket.rb: [DOC] fix nonblock methodsnobu
* ext/socket/lib/socket.rb (BasicSocket#recv_nonblock): fix exception class and symbol. * ext/socket/lib/socket.rb (BasicSocket#recvmsg_nonblock): ditto. * ext/socket/lib/socket.rb (Socket#recvfrom_nonblock): fix the method name. * ext/socket/lib/socket.rb (UDPSocket#recvfrom_nonblock): both. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@57691 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-02-23[DOC] {read,write}_nonblock with exception: falsenobu
Update docs to reflect EOF behavior change of read_nonblock and write_nonblock when using `exception: false`. [Fix GH-1527] Author: Russell Davis <russell-stripe@users.noreply.github.com> git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@57690 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-02-22rational.c: infinity in powernobu
* rational.c (nurat_expt): return 0 due to overflow. [ruby-core:79686] [Bug #13242]: git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@57689 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-02-22rational.c: infinity in powernobu
* rational.c (nurat_expt): return Infinity due to overflow. [ruby-core:79686] [Bug #13242]: git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@57688 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-02-22* 2017-02-23svn
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@57687 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-02-22rational.c: fix rdockazu
* rational.c: [DOC] fix wrong indentations and comment out some lines in code examples to make them valid Ruby code and syntax highlighted on the rendered page. [ci skip] [ruby-core:79607] [Bug #13233] Author: Marcus Stollsteimer <sto.mar@web.de> git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@57686 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-02-22eval_error.c: backstrace in reverse ordernobu
* eval_error.c (rb_threadptr_error_print): print backtrace and error message in reverse order if STDERR is unchanged and a tty. [Feature #8661] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@57685 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-02-22refine warning message for binary regexp /.../n.akr
Reported by Herwin W. [ruby-core:78592] [Bug #13024] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@57684 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-02-22Thread#fetchnobu
* thread.c (rb_thread_fetch): add new method Thread#fetch. [Feature #13009] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@57683 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-02-22numeric.c: Numeric#clone and #dupnobu
* numeric.c (num_clone, num_dup): no longer raises TypeError, returns the receiver instead as well as Integer and Float. [ruby-core:79636] [Bug #13237] * object.c (rb_immutable_obj_clone): immutable object clone with freeze optional keyword argument. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@57682 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-02-22* 2017-02-22svn
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@57681 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-02-22object.c: refactor rb_obj_clone and rb_obj_clone2nobu
* object.c (rb_obj_clone2): extract option for clone, and split by whether the object is immutable or mutable. * object.c (rb_obj_clone): no arguments, return immutable object immediately. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@57680 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-02-21object.c: message encodingnobu
* object.c (rb_obj_clone2): preserve encoding in error messages. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@57679 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-02-21backward.h: RClassDeprecatednobu
* include/ruby/backward.h (RClassDeprecated): move from ruby/ruby.h. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@57678 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-02-21* properties.svn
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@57677 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-02-21add performance counting mechanism for MRI debug/tuning purpose.ko1
* How to enable this feature? * define USE_DEBUG_COUNTER as 1. * you can disable to output the result with RUBY_DEBUG_COUNTER_DISABLE environment variable even if USE_DEBUG_COUNTER == 1. * How to add new counter? * add COUNTER(<name>) line on debug_counter.h. * include "debug_counter.h" * insert RB_DEBUG_COUNTER_INC(<name>) line on your favorite place. * counter output example: [RUBY_DEBUG_COUNTER] mc_inline_hit 999 [RUBY_DEBUG_COUNTER] mc_inline_miss 3 [RUBY_DEBUG_COUNTER] mc_global_hit 23 [RUBY_DEBUG_COUNTER] mc_global_miss 273 [RUBY_DEBUG_COUNTER] mc_global_state_miss 3 [RUBY_DEBUG_COUNTER] mc_class_serial_miss 0 [RUBY_DEBUG_COUNTER] mc_cme_complement 0 [RUBY_DEBUG_COUNTER] mc_cme_complement_hit 0 [RUBY_DEBUG_COUNTER] mc_search_super 1384 [RUBY_DEBUG_COUNTER] ivar_get_hit 0 [RUBY_DEBUG_COUNTER] ivar_get_miss 0 [RUBY_DEBUG_COUNTER] ivar_set_hit 0 [RUBY_DEBUG_COUNTER] ivar_set_miss 0 [RUBY_DEBUG_COUNTER] ivar_get 431 [RUBY_DEBUG_COUNTER] ivar_set 465 * mc_... is related to method caching. * ivar_... is related to instance variable accesses. * compare with dtrace/system tap features, there are completely no performacne penalties when it is disabled. * This feature is supported only on __GNUC__ compilers. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@57676 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-02-21backward.h: move deprecated declarationnobu
* include/ruby/backward.h (rb_autoload): move declaration of deprecated function. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@57675 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-02-21variable.c: remove deprecated internal featurenobu
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@57674 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-02-21error.c: remove deprecated internal featuresnobu
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@57673 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-02-21complex.c: remove deprecated functionsnobu
* complex.c (rb_complex_set_real, rb_complex_set_imag): remove functions deprecated at 2.2. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@57672 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-02-21backward.h: 2.2 deprecated featuresnobu
* include/ruby/backward.h (DECLARE_DEPRECATED_FEATURE): move features deprecated at 2.2. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@57671 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-02-21internal.h: removed function declarationnobu
* internal.h (rb_compile_error_str): remove declaration of removed internal function at r54189. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@57670 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-02-21variable.c: noreturn in GCCnobu
* variable.c (rb_generic_ivar_table): declare as noreturn only in GCC, which does not err on different attributes. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@57669 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-02-20* 2017-02-21svn
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@57668 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-02-20remove harmful declaration.ko1
* variable.c (gen_ivtbl_get): declaration conflict on VC++. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@57667 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-02-20compile.c: Fix a typoyui-knk
* compile.c (compile_branch_condition): NODE_LIT is always true. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@57666 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-02-20extension.rdoc: add document titlekazu
* doc/extension.rdoc, doc/extension.ja.rdoc: [DOC] add title and adapt subheading levels. * doc/extension.rdoc: [DOC] fix subheading level of section about "Ruby Constants That Can Be Accessed From C". * doc/extension.ja.rdoc: [DOC] add missing subheading. [ruby-core:79590] [Bug #13229] Author: Marcus Stollsteimer <sto.mar@web.de> git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@57665 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-02-20Supress warning: function might be candidate for attribute 'noreturn'naruse
GCC7 shows it. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@57664 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-02-20Cast as VALUE to suppress type warningsnaruse
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@57663 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-02-20They are enum yytokentype, need castnaruse
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@57662 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-02-20assertions.rb: ignore exit in childnobu
* test/lib/test/unit/assertions.rb (assert_separately): ignore SystemExit. unsuccessful exit still fails an assertion later. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@57661 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-02-20regparse.c: initialize return valuesnobu
* regparse.c (parse_char_class): initialize return values before depth limit check. returned values will be freed in callers regardless the error. [ruby-core:79624] [Bug #13234] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@57660 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-02-20parse.y: new_qcallnobu
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@57659 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-02-20parse.y: ID2VALnobu
* parse.y (ID2VAL): split from TOKEN2VAL. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@57658 b2dd03c8-39d4-4d8f-98ff-823fe69b080e