2013-02-25 04:44:08 +04:00
|
|
|
# -*- rdoc -*-
|
|
|
|
|
2014-12-25 16:53:36 +03:00
|
|
|
= NEWS for Ruby 2.3.0
|
2008-12-12 12:46:28 +03:00
|
|
|
|
|
|
|
This document is a list of user visible feature changes made between
|
|
|
|
releases except for bug fixes.
|
|
|
|
|
|
|
|
Note that each entry is kept so brief that no reason behind or
|
|
|
|
reference information is supplied with. For a full list of changes
|
2015-12-22 23:00:31 +03:00
|
|
|
with all sufficient information, see the ChangeLog file or Redmine
|
|
|
|
(e.g. <tt>https://bugs.ruby-lang.org/issues/$FEATURE_OR_BUG_NUMBER</tt>)
|
2008-12-12 12:46:28 +03:00
|
|
|
|
2014-12-25 16:53:36 +03:00
|
|
|
== Changes since the 2.2.0 release
|
2010-09-15 20:14:05 +04:00
|
|
|
|
2013-02-23 18:23:39 +04:00
|
|
|
=== Language changes
|
2013-08-01 21:33:29 +04:00
|
|
|
|
2015-09-27 09:44:02 +03:00
|
|
|
* frozen-string-literal pragma:
|
2015-12-08 06:08:33 +03:00
|
|
|
|
2020-05-18 14:42:20 +03:00
|
|
|
* new pragma, frozen-string-literal has been experimentally introduced. [Feature #8976]
|
2015-09-27 09:47:00 +03:00
|
|
|
* besides, --enable/--disable=frozen-string-literal options also have
|
2015-12-08 18:05:13 +03:00
|
|
|
been introduced. [Feature #8976]
|
2015-12-09 20:02:02 +03:00
|
|
|
* command line options --debug or --debug=frozen-string-literal enable
|
2015-11-25 10:39:14 +03:00
|
|
|
additional debugging mode which shows created location with at frozen
|
2020-05-18 14:42:20 +03:00
|
|
|
object error (RuntimeError). [Feature #11725]
|
2015-09-27 09:44:02 +03:00
|
|
|
|
2015-10-22 09:30:12 +03:00
|
|
|
* safe navigation operator:
|
|
|
|
|
2015-11-06 06:39:23 +03:00
|
|
|
* new method call syntax, `object&.foo', method #foo is called on
|
2020-05-18 14:42:20 +03:00
|
|
|
`object' if it is not nil. [Feature #11537]
|
|
|
|
|
|
|
|
This is similar to `try!' in Active Support, except:
|
2015-10-22 09:30:12 +03:00
|
|
|
* method name is syntactically required
|
|
|
|
obj.try! {} # valid
|
2015-11-06 06:39:23 +03:00
|
|
|
obj&. {} # syntax error
|
2015-10-23 19:53:41 +03:00
|
|
|
* arguments are evaluated only if a call is made:
|
|
|
|
obj.try!(:foo, bar()) # bar() is always evaluated
|
2015-11-06 06:39:23 +03:00
|
|
|
obj&.foo(bar()) # bar() is conditionally evaluated
|
2015-10-22 09:30:12 +03:00
|
|
|
* attribute assignment is valid
|
2015-11-06 06:39:23 +03:00
|
|
|
obj&.attr += 1
|
2015-10-22 09:30:12 +03:00
|
|
|
|
2015-12-22 20:30:22 +03:00
|
|
|
* the did_you_mean gem:
|
|
|
|
|
|
|
|
* When a NameError or NoMethodError occurs because of a typo in the name,
|
|
|
|
the did_you_mean gem automatically suggests other names similar to the
|
|
|
|
method name.
|
|
|
|
|
|
|
|
"Yuki".starts_with?("Y")
|
|
|
|
# => NoMethodError: undefined method `starts_with?' for "Yuki":String
|
|
|
|
# Did you mean? start_with?
|
|
|
|
|
2015-12-08 06:08:33 +03:00
|
|
|
* indented here document:
|
|
|
|
|
|
|
|
* new string literal, here document starts with `<<~`.
|
2020-05-18 14:42:20 +03:00
|
|
|
refer doc/syntax/literals.rdoc for more details. [Feature #9098]
|
2015-12-08 06:08:33 +03:00
|
|
|
|
2013-02-23 18:23:39 +04:00
|
|
|
=== Core classes updates (outstanding ones only)
|
2013-03-10 22:23:00 +04:00
|
|
|
|
2015-07-30 06:32:46 +03:00
|
|
|
* ARGF
|
|
|
|
|
2020-05-18 14:42:20 +03:00
|
|
|
* ARGF.read_nonblock supports `exception: false' like IO#read_nonblock. [Feature #11358]
|
2015-07-30 06:32:46 +03:00
|
|
|
|
2015-06-21 17:53:28 +03:00
|
|
|
* Array
|
|
|
|
|
|
|
|
* Array#bsearch_index [Feature #10730]
|
2015-11-09 15:27:26 +03:00
|
|
|
* Array#dig [Feature #11643]
|
2015-06-21 17:53:28 +03:00
|
|
|
|
2015-12-15 23:19:35 +03:00
|
|
|
* Comparable
|
|
|
|
|
|
|
|
* Comparable#== no longer rescues exceptions [Feature #7688]
|
|
|
|
|
2015-12-17 16:50:38 +03:00
|
|
|
* Encoding
|
|
|
|
|
|
|
|
* new Encoding::IBM037 (alias ebcdic-cp-us; dummy)
|
|
|
|
|
2015-05-14 13:42:42 +03:00
|
|
|
* Enumerable
|
|
|
|
|
2020-05-18 14:42:20 +03:00
|
|
|
* Enumerable#grep_v is added as inverse version of Enumerable#grep. [Feature #11049]
|
2015-06-14 11:54:19 +03:00
|
|
|
* Enumerable#chunk_while [Feature #10769]
|
2015-05-14 13:42:42 +03:00
|
|
|
|
2015-12-08 15:31:28 +03:00
|
|
|
* Enumerator::Lazy
|
|
|
|
|
|
|
|
* Enumerator::Lazy#grep_v [Feature #11773]
|
|
|
|
|
2015-09-18 14:11:14 +03:00
|
|
|
* File
|
|
|
|
|
|
|
|
* File.mkfifo [Feature #11536]
|
2015-11-08 10:27:25 +03:00
|
|
|
* Add File::TMPFILE corresponding to O_TMPFILE
|
2015-09-18 14:11:14 +03:00
|
|
|
|
2015-06-21 17:53:28 +03:00
|
|
|
* Hash
|
|
|
|
|
|
|
|
* Hash#fetch_values [Feature #10017]
|
2015-11-09 15:27:26 +03:00
|
|
|
* Hash#dig [Feature #11643]
|
2015-11-10 08:02:02 +03:00
|
|
|
* Hash#<=, Hash#<, Hash#>=, Hash#> [Feature #10984]
|
2015-11-10 10:57:17 +03:00
|
|
|
* Hash#to_proc [Feature #11653]
|
2015-06-21 17:53:28 +03:00
|
|
|
|
2015-06-12 15:14:06 +03:00
|
|
|
* IO
|
|
|
|
|
|
|
|
* new mode flag File::SHARE_DELETE is available.
|
|
|
|
this flag means to permit deleting opened file on Windows, but currently
|
|
|
|
this affect only files opened as binary. [Feature #11218]
|
|
|
|
|
2015-07-29 04:39:14 +03:00
|
|
|
* new option parameter `flags' is added.
|
2020-05-18 14:42:20 +03:00
|
|
|
this parameter is bitwise-ORed to oflags generated by normal mode argument. [Feature #11253]
|
2015-07-29 04:39:14 +03:00
|
|
|
|
2015-12-16 17:48:09 +03:00
|
|
|
* IO#advise no longer raises Errno::ENOSYS in cases where it was
|
2015-12-16 10:16:00 +03:00
|
|
|
detected at build time but not available at runtime. [Feature #11806]
|
|
|
|
|
2015-10-22 12:58:01 +03:00
|
|
|
* Kernel
|
|
|
|
|
|
|
|
* Kernel#loop, when stopped by a StopIteration exception, returns
|
2015-10-27 16:01:19 +03:00
|
|
|
what the enumerator has returned instead of nil. [Feature #11498]
|
2015-10-22 12:58:01 +03:00
|
|
|
|
2015-07-30 07:20:00 +03:00
|
|
|
* Module
|
|
|
|
* Module#deprecate_constant [Feature #11398]
|
|
|
|
|
2015-06-18 07:50:33 +03:00
|
|
|
* NameError
|
2015-06-21 17:48:35 +03:00
|
|
|
* NameError#receiver is added to take the receiver object. [Feature #10881]
|
2015-06-18 07:50:33 +03:00
|
|
|
|
2015-07-30 06:32:46 +03:00
|
|
|
* Numeric
|
|
|
|
|
|
|
|
* Numeric#positive? and Numeric#negative? are added, which return
|
2020-05-18 14:42:20 +03:00
|
|
|
true when the receiver is positive and negative respectively. [Feature #11151]
|
2015-07-30 06:32:46 +03:00
|
|
|
|
2015-10-06 00:34:24 +03:00
|
|
|
* Proc
|
|
|
|
|
|
|
|
* Proc#call (and also #[], #===, #yield) are optimized.
|
2015-11-17 05:22:29 +03:00
|
|
|
Backtrace doesn't show each method (show block lines directly).
|
|
|
|
TracePoint also ignores these calls. [Feature #11569]
|
2015-10-06 00:34:24 +03:00
|
|
|
|
2015-11-21 03:46:53 +03:00
|
|
|
* Queue (Thread::Queue)
|
|
|
|
|
|
|
|
* Queue#close is added to notice a termination. [Feature #10600]
|
|
|
|
|
2015-11-17 09:34:52 +03:00
|
|
|
* Regexp/String: Updated Unicode version from 7.0.0 to 8.0.0
|
|
|
|
|
2015-12-08 16:58:50 +03:00
|
|
|
* RubyVM::InstructionSequence
|
|
|
|
* add the following methods as a primitive tool of iseq loader.
|
|
|
|
See sample/iseq_loader.rb for usage.
|
2015-12-09 07:51:29 +03:00
|
|
|
Note that loader does not have verifier so it is easy to cause
|
|
|
|
critical problem by loading modified/broken binary data.
|
|
|
|
See [Feature #11788] for more details. (experimental feature)
|
2015-12-09 18:29:31 +03:00
|
|
|
* RubyVM::InstructionSequence#to_binary(extra_data = nil)
|
|
|
|
* RubyVM::InstructionSequence.load_from_binary(binary)
|
|
|
|
* RubyVM::InstructionSequence.load_from_binary_extra_data(binary)
|
2015-12-08 16:58:50 +03:00
|
|
|
|
2015-12-07 19:30:31 +03:00
|
|
|
* String
|
|
|
|
|
2020-05-18 14:42:20 +03:00
|
|
|
* String#+@ and String#-@ are added to get mutable/frozen strings. [Feature #11782]
|
2015-12-07 19:30:31 +03:00
|
|
|
|
2020-05-18 14:42:20 +03:00
|
|
|
* String.new now accepts new option parameter `encoding'. [Feature #11785]
|
2015-12-08 19:48:52 +03:00
|
|
|
|
2015-11-16 12:21:56 +03:00
|
|
|
* Struct
|
2015-11-24 02:30:09 +03:00
|
|
|
* Struct#dig [Feature #11688]
|
2015-11-16 12:21:56 +03:00
|
|
|
|
2015-07-30 06:32:46 +03:00
|
|
|
* Thread
|
|
|
|
* Thread#name, Thread#name= are added to handle thread names [Feature #11251]
|
|
|
|
|
2013-02-23 18:23:39 +04:00
|
|
|
=== Core classes compatibility issues (excluding feature bug fixes)
|
2013-03-07 21:54:49 +04:00
|
|
|
|
2015-01-15 04:44:57 +03:00
|
|
|
* Array
|
|
|
|
* Array#select!, Array#keep_if, Array#reject!, and Array#delete_if
|
|
|
|
no longer changes the receiver array instantly every time the
|
2015-01-21 03:22:42 +03:00
|
|
|
block is called. [Feature #10714]
|
2015-01-15 04:44:57 +03:00
|
|
|
|
2015-01-25 06:04:10 +03:00
|
|
|
* Array#flatten and Array#flatten! no longer try to call #to_ary
|
|
|
|
method on elements beyond the given level. [Bug #10748]
|
|
|
|
|
2015-12-10 21:57:08 +03:00
|
|
|
* Array#inspect doesn't raise error even if its content returns
|
|
|
|
a string which is not compatible with Encoding.default_external
|
|
|
|
as inspected result. [Feature #11801]
|
|
|
|
|
2015-04-06 16:53:24 +03:00
|
|
|
* Enumerable
|
|
|
|
* Enumerable#chunk and Enumerable#slice_before no longer takes the
|
|
|
|
initial_state argument. [Feature #10958]
|
|
|
|
Use a local variable instead to maintain a state.
|
|
|
|
|
2015-06-13 14:50:21 +03:00
|
|
|
* File::Stat
|
2015-06-13 15:02:17 +03:00
|
|
|
* On Windows File::Stat#ino always returned 0, but now returns
|
2015-12-09 17:14:40 +03:00
|
|
|
BY_HANDLE_FILE_INFORMATION.nFileIndexHigh/Low. [Feature #11216]
|
2015-06-13 14:50:21 +03:00
|
|
|
|
2015-12-10 21:57:08 +03:00
|
|
|
* Hash
|
|
|
|
* Hash#inspect doesn't raise error even if its content returns
|
|
|
|
a string which is not compatible with Encoding.default_external
|
|
|
|
as inspected result. [Feature #11801]
|
|
|
|
|
2015-01-16 01:16:30 +03:00
|
|
|
* IO
|
2015-01-21 03:10:45 +03:00
|
|
|
* IO#close doesn't raise when the IO object is closed. [Feature #10718]
|
2015-08-17 05:57:39 +03:00
|
|
|
* IO#each_codepoint raises an exception at incomplete character
|
|
|
|
before EOF when conversion takes place. [Bug #11444]
|
2015-01-16 01:16:30 +03:00
|
|
|
|
2015-06-19 08:53:41 +03:00
|
|
|
* Module
|
|
|
|
* Module#define_method and Object.define_singleton_method now
|
|
|
|
require method body, Proc, Method, or a block, and raise
|
|
|
|
ArgumentError if no block is given directly. [Bug #11283]
|
|
|
|
|
2015-06-12 15:22:36 +03:00
|
|
|
* pack/unpack (Array/String)
|
|
|
|
* j and J directives for pointer width integer type. [Feature #11215]
|
|
|
|
|
|
|
|
|
2013-02-23 18:23:39 +04:00
|
|
|
=== Stdlib updates (outstanding ones only)
|
2013-03-11 21:27:03 +04:00
|
|
|
|
2015-11-17 18:25:07 +03:00
|
|
|
* Logger
|
|
|
|
|
|
|
|
* Logger#level= now supports symbol and string levels such as :debug, :info,
|
|
|
|
:warn, :error, :fatal (case insensitive) [Feature #11695]
|
|
|
|
* Logger#reopen is added to reopen a log device. [Feature #11696]
|
|
|
|
|
2015-12-17 16:50:38 +03:00
|
|
|
* io/wait
|
|
|
|
* IO#wait_readable no longer checks FIONREAD, it may be used for
|
|
|
|
non-bytestream IO such as listen sockets.
|
|
|
|
|
|
|
|
* Net::FTP
|
|
|
|
* Net::FTP#mlst is added.
|
|
|
|
* Net::FTP#mlsd is added.
|
|
|
|
|
2015-12-12 17:01:56 +03:00
|
|
|
* nkf
|
|
|
|
* Merge nkf 2.1.4.
|
|
|
|
|
2015-04-10 13:38:13 +03:00
|
|
|
* ObjectSpace (objspace)
|
2015-08-21 14:30:24 +03:00
|
|
|
* ObjectSpace.count_symbols is added.
|
2015-04-10 13:38:13 +03:00
|
|
|
* ObjectSpace.count_imemo_objects is added.
|
2015-05-28 22:40:04 +03:00
|
|
|
* ObjectSpace.internal_class_of is added.
|
|
|
|
* ObjectSpace.internal_super_of is added.
|
2015-04-10 13:38:13 +03:00
|
|
|
|
2015-03-12 06:03:04 +03:00
|
|
|
* OpenSSL
|
connect_nonblock supports "exception: false"
This is for consistency with accept_nonblock arguments and gives a
minor speedup from avoiding exceptions.
[ruby-core:68838] [Feature #11024]
* ext/openssl/ossl_ssl.c (ossl_ssl_connect_nonblock):
support `exception: false'
* (get_no_exception): move function location
* ext/socket/socket.c (sock_connect_nonblock):
support `exception: false'
* test/openssl/test_pair.rb (test_connect_accept_nonblock_no_exception):
test `exception: false' on connect,
rename from `test_accept_nonblock_no_exception'
* test/socket/test_nonblock.rb (test_connect_nonblock_no_exception):
new test
Benchmark results:
default 0.050000 0.100000 0.150000 ( 0.151307)
exception: false 0.030000 0.080000 0.110000 ( 0.108840)
----------------------------8<-----------------------
require 'socket'
require 'benchmark'
require 'io/wait'
require 'tmpdir'
host = '127.0.0.1'
serv = TCPServer.new(host, 0) # UNIX sockets may not hit EINPROGRESS
nr = 5000 # few iterations to avoid running out of ports
addr = serv.getsockname
pid = fork do
begin
serv.accept.close
rescue => e
warn "#$$: #{e.message} (#{e.class})"
end while true
end
at_exit { Process.kill(:TERM, pid) }
serv.close
Benchmark.bmbm do |x|
x.report("default") do
nr.times do
s = Socket.new(:INET, :STREAM)
s.setsockopt(:SOL_SOCKET, :SO_REUSEADDR, 1)
begin
s.connect_nonblock(addr)
rescue IO::WaitWritable
s.wait_writable
end
s.close
end
end
x.report("exception: false") do
nr.times do
s = Socket.new(:INET, :STREAM)
s.setsockopt(:SOL_SOCKET, :SO_REUSEADDR, 1)
case s.connect_nonblock(addr, exception: false)
when :wait_writable
s.wait_writable
end
s.close
end
end
end
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@50254 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-04-12 04:41:51 +03:00
|
|
|
* OpenSSL::SSL::SSLSocket#accept_nonblock and
|
2020-05-18 14:42:20 +03:00
|
|
|
OpenSSL::SSL::SSLSocket#connect_nonblock supports `exception: false`. [Feature #10532]
|
2015-03-12 06:03:04 +03:00
|
|
|
|
2015-06-14 18:14:46 +03:00
|
|
|
* Pathname
|
2020-05-18 14:42:20 +03:00
|
|
|
* Pathname#descend and Pathname#ascend supported blockless form. [Feature #11052]
|
2015-06-14 18:14:46 +03:00
|
|
|
|
2015-12-17 16:50:38 +03:00
|
|
|
* Socket
|
|
|
|
* Socket#connect_nonblock, Socket#accept_nonblock,
|
|
|
|
TCPServer#accept_nonblock, UNIXServer#accept_nonblock,
|
|
|
|
BasicSocket#recv_nonblock, BasicSocket#recvmsg_nonblock,
|
|
|
|
BasicSocket#sendmsg_nonblock all support `exception: false` to return
|
|
|
|
:wait_readable or :wait_writable symbols instead of raising
|
2020-05-18 14:42:20 +03:00
|
|
|
IO::WaitReadable or IO::WaitWritable exceptions [Feature #10532] [Feature #11229]
|
2015-12-17 16:50:38 +03:00
|
|
|
* BasicSocket#recv and BasicSocket#recv_nonblock allow an output
|
|
|
|
String buffer argument like IO#read and IO#read_nonblock to reduce
|
2015-12-24 11:21:11 +03:00
|
|
|
GC overhead [Feature #11242]
|
2015-04-15 23:17:19 +03:00
|
|
|
|
2015-12-18 10:54:33 +03:00
|
|
|
* StringIO
|
|
|
|
* In read-only mode, StringIO#set_encoding no longer sets the encoding
|
|
|
|
of its buffer string. Setting the encoding of the string directly
|
2020-05-18 14:42:20 +03:00
|
|
|
without StringIO#set_encoding may cause unpredictable behavior now. [Bug #11827]
|
2015-12-18 10:54:33 +03:00
|
|
|
|
2015-07-13 13:11:38 +03:00
|
|
|
* timeout
|
|
|
|
* Object#timeout is now warned as deprecated when called.
|
|
|
|
|
2013-02-23 18:23:39 +04:00
|
|
|
=== Stdlib compatibility issues (excluding feature bug fixes)
|
2013-04-25 09:27:41 +04:00
|
|
|
|
2015-12-11 19:31:24 +03:00
|
|
|
* ext/coverage/coverage.c
|
|
|
|
* Coverage.peek_result: new method to allow coverage to be captured without
|
|
|
|
stopping the coverage tool. [Feature #10816]
|
2015-01-03 03:01:49 +03:00
|
|
|
|
2015-12-11 19:31:24 +03:00
|
|
|
* Fiddle
|
|
|
|
* Fiddle::Function#call releases the GVL. [Feature #11607]
|
2015-01-04 03:21:08 +03:00
|
|
|
|
2015-12-22 16:15:11 +03:00
|
|
|
* io-console
|
2015-12-23 18:26:08 +03:00
|
|
|
* Update to io-console 0.4.5, and change the license to BSD 2-clause
|
2015-12-22 16:56:34 +03:00
|
|
|
"Simplified" License.
|
2015-12-22 16:15:11 +03:00
|
|
|
|
2015-02-13 15:31:30 +03:00
|
|
|
* lib/base64.rb
|
2015-12-08 18:05:37 +03:00
|
|
|
* Base64.urlsafe_encode64: added a "padding" option to suppress
|
2015-12-09 17:14:40 +03:00
|
|
|
the padding character ("="). [Feature #10740]
|
2015-12-08 18:05:37 +03:00
|
|
|
* Base64.urlsafe_decode64: now it accepts not only correctly-padded
|
2015-12-09 17:14:40 +03:00
|
|
|
input but also unpadded input. [Feature #10740]
|
2015-02-13 15:31:30 +03:00
|
|
|
|
2015-12-11 19:31:24 +03:00
|
|
|
* lib/drb/drb.rb
|
|
|
|
* removed unused argument. https://github.com/ruby/ruby/pull/515
|
|
|
|
|
2015-03-06 02:45:42 +03:00
|
|
|
* lib/matrix.rb
|
2015-12-08 18:05:37 +03:00
|
|
|
* Add Vector#round. https://github.com/ruby/ruby/pull/802
|
2015-03-06 02:45:42 +03:00
|
|
|
|
2015-12-11 19:31:24 +03:00
|
|
|
* lib/webrick/utils.rb
|
|
|
|
* removed unused argument. https://github.com/ruby/ruby/pull/356
|
|
|
|
|
|
|
|
* Net::FTP
|
|
|
|
* Connections are in passive mode per default now. The default mode can
|
|
|
|
be changed by Net::FTP.default_passive=. [Feature #11612]
|
2015-02-13 18:53:47 +03:00
|
|
|
|
2015-11-07 19:48:49 +03:00
|
|
|
* Net::HTTP
|
|
|
|
* default value of Net::HTTP#open_timeout is now 60 (was nil).
|
|
|
|
|
2015-05-22 10:48:39 +03:00
|
|
|
* Net::Telnet
|
2020-05-18 14:42:20 +03:00
|
|
|
* Net::Telnet is extracted to net-telnet gem. It's unmaintain code. [Feature #11083]
|
2015-05-22 10:48:39 +03:00
|
|
|
|
2015-12-22 16:11:13 +03:00
|
|
|
* Psych
|
|
|
|
* Updated to Psych 2.0.17
|
|
|
|
|
2015-12-11 19:31:24 +03:00
|
|
|
* Rake
|
|
|
|
* Rake is removed from stdlib. [Feature #11025]
|
2015-11-11 06:48:45 +03:00
|
|
|
|
2015-12-22 16:09:06 +03:00
|
|
|
* RDoc
|
|
|
|
* Updated to RDoc 4.2.1. For full release notes see:
|
|
|
|
|
|
|
|
https://github.com/rdoc/rdoc/blob/master/History.rdoc#421--2015-12-22
|
|
|
|
|
2015-12-11 05:58:52 +03:00
|
|
|
* RubyGems
|
|
|
|
* Updated to RubyGems 2.5.1. For full release notes see:
|
|
|
|
|
|
|
|
http://docs.seattlerb.org/rubygems/History_txt.html#label-2.5.0+-2F+2015-11-03
|
|
|
|
and
|
|
|
|
http://docs.seattlerb.org/rubygems/History_txt.html#label-2.5.1+-2F+2015-12-10
|
|
|
|
|
2013-06-14 04:53:37 +04:00
|
|
|
=== Built-in global variables compatibility issues
|
|
|
|
|
2015-06-19 19:24:33 +03:00
|
|
|
* $SAFE
|
|
|
|
* $SAFE=2 and $SAFE=3 are obsolete. If $SAFE is set to 2 or larger,
|
2015-06-21 17:48:48 +03:00
|
|
|
an ArgumentError is raised. [Feature #5455]
|
2015-06-19 19:24:33 +03:00
|
|
|
|
2013-02-23 18:23:39 +04:00
|
|
|
=== C API updates
|
2013-11-23 08:46:34 +04:00
|
|
|
|
2015-06-28 06:07:37 +03:00
|
|
|
* rb_define_class_id_under() now raises a TypeError exception when the
|
|
|
|
class is already defined but its superclass does not match the given
|
|
|
|
superclass, as well as definitions in ruby level.
|
|
|
|
|
2020-05-18 14:42:20 +03:00
|
|
|
* rb_timespec_now() is added to fetch current datetime as struct timespec. [Feature #11558]
|
2015-11-10 05:59:47 +03:00
|
|
|
|
|
|
|
* rb_time_timespec_new() is added to create a time object with epoch,
|
2015-11-11 16:28:33 +03:00
|
|
|
nanosecond, and UTC/localtime/time offset arguments. [Feature #11558]
|
2015-11-10 05:59:47 +03:00
|
|
|
|
introduce rb_autoload_str to replace rb_autoload
rb_autoload_str may be safer by preventing premature GC. It
can also be more efficient by passing a pre-frozen string that
can be deduped using rb_fstring. Common autoload callers (e.g.
rubygems, rdoc) already use string literals as the file
argument.
There seems to be no reason to expose rb_autoload_str to the
public C API since autoload is not performance-critical.
Applications may declare autoloads in Ruby code or via
rb_funcall; so merely deprecate rb_autoload without exposing
rb_autoload_str to new users.
Running: valgrind -v ruby -rrdoc -rubygems -e exit
shows a minor memory reduction (32-bit userspace)
before:
in use at exit: 1,600,621 bytes in 28,819 blocks
total heap usage: 55,786 allocs, 26,967 frees, 6,693,790 bytes allocated
after:
in use at exit: 1,599,778 bytes in 28,789 blocks
total heap usage: 55,739 allocs, 26,950 frees, 6,692,973 bytes allocated
* include/ruby/intern.h (rb_autoload): deprecate
* internal.h (rb_autoload_str): declare
* load.c (rb_mod_autoload): use rb_autoload_str
* variable.c (rb_autoload): become compatibility wrapper
(rb_autoload_str): hoisted out from old rb_autoload
[ruby-core:71369] [Feature #11664]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@52909 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-12-06 15:28:09 +03:00
|
|
|
* rb_autoload() deprecated, use rb_funcall() instead. [Feature #11664]
|
|
|
|
|
2015-12-24 12:43:22 +03:00
|
|
|
* rb_compile_error_with_enc(), rb_compile_error(), and rb_compile_bug()
|
|
|
|
deprecated. these functions are exposed but only for internal use.
|
|
|
|
external libraries should not use them.
|
|
|
|
|
2015-12-24 08:59:17 +03:00
|
|
|
=== Supported platform changes
|
2015-11-23 06:54:42 +03:00
|
|
|
|
2015-10-18 04:18:55 +03:00
|
|
|
* OS/2 is no longer supported
|
2015-11-23 06:54:42 +03:00
|
|
|
|
2015-11-24 03:17:11 +03:00
|
|
|
* BeOS is no longer supported
|
|
|
|
|
2015-10-18 05:11:23 +03:00
|
|
|
* Borland-C is no longer supported
|
2015-11-23 06:54:42 +03:00
|
|
|
|
|
|
|
* Haiku now stable and best effort
|
2015-12-24 08:59:17 +03:00
|
|
|
|
|
|
|
=== Implementation improvements
|
|
|
|
|
2020-05-18 14:42:20 +03:00
|
|
|
* Optimize Proc#call to eliminate method frame construction. [Feature #11569]
|
2015-12-24 08:59:17 +03:00
|
|
|
|
2020-05-18 14:42:20 +03:00
|
|
|
* Reconsidering method entry data structure. [Bug #11278]
|
2015-12-24 08:59:17 +03:00
|
|
|
|
|
|
|
* Introducing new table data structure for ID keys tables used by
|
|
|
|
method table and so on. New table structure is simple and fast
|
|
|
|
than st_table. [Feature #11420]
|
|
|
|
|
|
|
|
* Machine code level tuning for object allocation and method calling
|
|
|
|
code. r52099, r52254
|
|
|
|
|
2020-05-18 14:42:20 +03:00
|
|
|
* RubyVM::InstructionSequence is extended for future improvement. [Feature #11788]
|
2015-12-24 08:59:17 +03:00
|
|
|
|
|
|
|
* Case dispatch is now optimized for all special constant literals
|
|
|
|
including nil, true, and false. Previously, only literal strings,
|
2020-05-18 14:42:20 +03:00
|
|
|
symbols, integers and floats compiled to optimized case dispatch. [Feature #11769]
|
2015-12-24 08:59:17 +03:00
|
|
|
|
|
|
|
* Instance variables on non-pure Ruby classes (T_DATA, T_FILE,
|
|
|
|
etc..) is less expensive to store than before. [Feature #11170]
|
|
|
|
|
|
|
|
* All accesses to members of big Struct objects are performed in
|
|
|
|
constant-time. Previously, Struct elements beyond the first 10
|
2016-01-01 13:39:16 +03:00
|
|
|
elements used a linear scan. [Feature #10585]
|
2015-12-24 08:59:17 +03:00
|
|
|
|
2020-05-18 14:42:20 +03:00
|
|
|
* The Set class got several speed up. [Misc #10754], [r52591]
|
2015-12-24 08:59:17 +03:00
|
|
|
|
2015-12-24 11:21:11 +03:00
|
|
|
* Socket and I/O-related improvements
|
2015-12-24 08:59:17 +03:00
|
|
|
|
2015-12-24 11:21:11 +03:00
|
|
|
* Calling overhead of most of new keyword-using I/O methods in
|
|
|
|
[Feature #11229] is reduced by avoiding the inefficient C API
|
|
|
|
to parse keywords. [Feature #11339]
|
2015-12-24 08:59:17 +03:00
|
|
|
|
|
|
|
* The standard library is updated to use the improved
|
2015-12-24 11:21:11 +03:00
|
|
|
exception-free non-blocking I/O from [Feature #11229].
|
|
|
|
This has the additional benefit of quieter $DEBUG output in
|
|
|
|
addition to reducing expensive exceptions. [Feature #11044]
|
2015-12-24 08:59:17 +03:00
|
|
|
|
|
|
|
* (Linux-only) waiting on a single FD anywhere in the stdlib no longer
|
2020-05-18 14:42:20 +03:00
|
|
|
uses select(2), making it immune to slowdowns with high-numbered
|
|
|
|
FDs. [Feature #11081] [Feature #11377]
|
2015-12-24 17:02:02 +03:00
|
|
|
|
2015-12-27 13:55:59 +03:00
|
|
|
* CGI.escapeHTML is optimized with C extension.
|
2015-12-24 17:02:02 +03:00
|
|
|
https://github.com/ruby/ruby/pull/1164
|