summaryrefslogtreecommitdiff
AgeCommit message (Collapse)Author
2017-10-21ext/win32ole/win32ole.c (fole_missing): set receiver in NoMethodError.suke
test/win32ole/test_win32ole.rb: ditto. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@60330 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-10-21* remove trailing spaces.svn
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@60329 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-10-21* string.c: [DOC] Split rdoc of String#<< and String#concat [ci skip]sonots
Split String#<< and String#concat docs to reflect single and multiple arguments patched by MSP-Greg [fix GH-1614] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@60328 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-10-21* object.c: Improve documentation of Kernel#Arraysonots
Array(arg) does more than just call to_ary or to_a on the argument. It also falls back to returning [arg] if neither method is available. This patch extends the description and adds a few examples of how it handles common types of arguments, including an integer (which does not implement to_ary or to_a). Extend Kernel#Array doc to mention TypeError patched by ragesoss (Sage Ross) [fix GH-1663] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@60327 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-10-21* doc/regexp.rdoc: In regexp doc, two backslashes match one literallysonots
In the "Metacharacters and Escapes" section of regexp.rdoc, it said that to match a backslash literally, it must be backslash-escaped, but the rendered HTML showed three backslashes (\\\). There should only be two backslashes (\\). patched by jlmuir (J. Lewis Muir) [fix GH-1677] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@60326 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-10-21* doc/regexp.rdoc: Fix regexp doc syntax highlightingsonots
patched by jlmuir (J. Lewis Muir) [fix GH-1678] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@60325 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-10-21* string.c: Remove errant "the" in gsub documentationsonots
patched by jlmuir (J. Lewis Muir) [fix GH-1679] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@60324 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-10-21Fix typo in commentsonots
* test/ruby/test_transcode.rb: fix typo in comment patched by larskanis (Lars Kanis) [GH-1681] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@60323 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-10-21compile.c: optimize local variable assignmentsnobu
* compile.c (iseq_peephole_optimize): eliminate repeated assignments and copy from/to a same local variable. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@60322 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-10-21reference Socket.getaddrinfo to Addrinfo.getaddrinfo.akr
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@60321 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-10-21Improve performance of string interpolationnobu
This patch will add pre-allocation in string interpolation. By this, unecessary capacity resizing is avoided. For small strings, optimized `rb_str_resurrect` operation is faster, so pre-allocation is done only when concatenated strings are large. `MIN_PRE_ALLOC_SIZE` was decided by experimenting with local machine (x86_64-apple-darwin 16.5.0, Apple LLVM version 8.1.0 (clang - 802.0.42)). String interpolation will be faster around 72% when large string is created. * Before ``` Calculating ------------------------------------- Large string interpolation 1.276M (± 5.9%) i/s - 6.358M in 5.002022s Small string interpolation 5.156M (± 5.5%) i/s - 25.728M in 5.005731s ``` * After ``` Calculating ------------------------------------- Large string interpolation 2.201M (± 5.8%) i/s - 11.063M in 5.043724s Small string interpolation 5.192M (± 5.7%) i/s - 25.971M in 5.020516s ``` * Test code ```ruby require 'benchmark/ips' Benchmark.ips do |x| x.report "Large string interpolation" do |t| a = "Hellooooooooooooooooooooooooooooooooooooooooooooooooooo" b = "Wooooooooooooooooooooooooooooooooooooooooooooooooooorld" t.times do "#{a}, #{b}!" end end x.report "Small string interpolation" do |t| a = "Hello" b = "World" t.times do "#{a}, #{b}!" end end end ``` [Fix GH-1626] From: Nao Minami <south37777@gmail.com> git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@60320 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-10-21deprecate TCPSocket.gethostbyname.akr
TCPSocket.gethostbyname has problems similar to Socket.gethostbyname. An example of the problem which only the address family of the first address is returned: ``` pp TCPSocket.gethostbyname("www.wide.ad.jp") #=> ["www.wide.ad.jp", [], 10, "2001:200:dff:fff1:216:3eff:fe4b:651c", "203.178.137.58"] ``` The address family of the first address, AF_INET6 (10), is returned but the address family of the second address, AF_INET, is not returned. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@60319 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-10-21openssl: merge test fix from upstreamrhe
Merge a commit from upstream: d1cbf6d75280 test/test_ssl_session: skip tests for session_remove_cb Tests using SSL::SSLContext#session_remove_cb= are now skipped. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@60318 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-10-21Avoid use of `self.class.new(self)` in Set#collect!knu
That prevents infinite recursion when a subclass of Set uses `collect!` in its constructor. This should fix [Bug #12437]. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@60317 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-10-21ignore server side errornaruse
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@60316 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-10-21Revert "ignore server side error"naruse
This reverts commit r60314. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@60315 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-10-21ignore server side errornaruse
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@60314 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-10-21fic expected error messagenaruse
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@60313 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-10-21Fix comparison methods of Set to check if `@hash` is actually comparableknu
This should fix comparison of rbtree backed SortedSet instances. [Bug #12072] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@60312 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-10-21Introduce Net::HTTP#min_version/max_version [Feature #9450]naruse
Set SSL minimum/maximum version. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@60311 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-10-21fix OpenSSL::SSL::SSLContext#min_version doesn't worknaruse
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@60310 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-10-21less random generations in Random::Formatter#choose.akr
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@60309 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-10-21Add documentation for `chomp` option.hsbt
https://github.com/ruby/ruby/pull/1717 Patch by @ksss [fix GH-1717] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@60308 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-10-21Remove not used node_type NODE_CVDECLyui-knk
* compile.c (defined_expr0): This node_type has not been used since r11614. * ext/objspace/objspace.c (count_nodes): ditto * node.c (dump_node): ditto * node.h (node_type, NEW_CVDECL): ditto git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@60307 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-10-21Handle Errno::EADDRNOTAVAIL with Raspberry Pi environment.hsbt
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@60306 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-10-21erb.1: add missing option in detailed descriptionk0kubun
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@60305 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-10-21Use a mutex to make SortedSet.setup thread-safeknu
This should fix [Bug #13735]. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@60304 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-10-21Remove redundant use of module_evalknu
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@60303 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-10-21Remove not used node_type NODE_IASGN2yui-knk
* compile.c (compile_massign_opt, iseq_compile_each0): This node_type has not been used since r11813. * ext/objspace/objspace.c (count_nodes): ditto * node.c (dump_node, rb_gc_mark_node): ditto * node.h (node_type, NEW_IASGN2): ditto * parse.y (node_assign_gen): ditto git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@60302 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-10-21driver.rb: allow executing driver.rb directlyk0kubun
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@60301 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-10-21The encoding of __FILE__ and __dir__ should be sameusa
* ruby.c (process_options): convert the real path of the script to locale encoding if its encoding is not locale (maybe UTF-8) on Windows/OS X. this change makes the encoding of __dir__ to the same encoding of __FILE__ when the script name is passed from commandline. * test/ruby/test_options.rb (test___dir__encoding): test for this change. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@60300 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-10-21driver.rb: add option to specify target with rbenvk0kubun
[close GH-1724] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@60299 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-10-21Allow a SortedSet to be frozen and still functional [Bug #12091]knu
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@60298 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-10-21SecureRandom.alphanumeric implemented.akr
[ruby-core:68098] [Feature #10849] proposed by Andrew Butterfield. SecureRandom.choose and SecureRandom.graph is not included. (The implementation has SecureRandom.choose but it is private.) I feel the method name, SecureRandom.choose, doesn't represent the behavior well. The actual use cases of SecureRandom.graph is not obvious. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@60297 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-10-21* remove trailing spaces.svn
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@60296 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-10-21Clarify return value for assignment methods.hsbt
https://github.com/ruby/ruby/pull/1682 Patch by @sos4nt [fix GH-1682] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@60295 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-10-21Clarify the behavior of IO.write without offset in write mode.hsbt
https://github.com/ruby/ruby/pull/1571 Patch by @takanabe [fix GH-1571] [Bug #11638][ruby-core:71277] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@60294 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-10-21erb.rb: specify frozen_string_literal: truek0kubun
for compilation performance. $ ruby ./benchmark/driver.rb -e "trunk::/Users/k0kubun/.rbenv/versions/trunk/bin/ruby;modified::/Users/k0kubun/.rbenv/versions/modified/bin/ruby" -d ./benchmark -p app_erb ----------------------------------------------------------- benchmark results: Execution time (sec) name trunk modified app_erb 1.911 1.885 Speedup ratio: compare with the result of `trunk' (greater is better) name modified app_erb 1.014 git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@60293 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-10-21* 2017-10-22svn
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@60292 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-10-21Update some words on README.md.hsbt
* Remove space on double spaces. * Capitalization of "Ruby". * Use macOS instead of OS X. https://github.com/ruby/ruby/pull/1610 Patch by @bunkrich [fix GH-1610] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@60291 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-10-21Added explicitly require to example code.hsbt
https://github.com/ruby/ruby/pull/1666 Patch by @guilherme [fix GH-1666] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@60290 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-10-21Do not pass a not used argumentyui-knk
* parse.y (new_op_assign_gen): new_op_assign_gen for ripper does not need column information. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@60289 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-10-21Use caller with length to reduce unused stringskazu
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@60288 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-10-21fix r60281ko1
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@60287 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-10-21Define the macro separately for ruby parser and for ripperyui-knk
* parse.y (new_op_assign): Define the macro separately for ruby parser and for ripper. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@60286 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-10-21Add doxygen commentssonots
* include/ruby/ruby.h (enum ruby_value_type): add doxygen comments * internal.h (enum imemo_type, struct vm_svar): add doxygen comments * method.h (rb_method_type_t, rb_method_iseq_t): add doxygen comments git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@60285 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-10-21io.c: introduce copy offload to IO.copy_streamglass
io.c (rb_io_s_copy_stream): add copy offload feature (by using copy_file_range(2) if available) to IO.copy_stream git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@60284 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-10-21test_pathname.rb#test_open should care about umaskkosaki
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@60283 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-10-21Fix r60271kazu
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@60282 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-10-21test_cp_preserve_permissions should care about umaskkosaki
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@60281 b2dd03c8-39d4-4d8f-98ff-823fe69b080e