7. rescue/else/ensure are now allowed
to be used directly with do/end blocks
AFTER:
lambda do
raise 'err'
rescue
$! # => #<RuntimeError: err>
end.call
BEFORE:
lambda do
begin
raise 'err'
rescue
$! # => #<RuntimeError: err>
end
end.call
8. Add yield_self to yield given block in its context
class Object
def yield_self(*args)
yield(self, *args)
end
end
2.yield_self { |x| x*x } # => 4
14. Top-level constant look-up is no longer available
# this is removed:
irb(main):001:0> class Auth; end
=> nil
irb(main):002:0> class Twitter; end
=> nil
irb(main):003:0> Twitter::Auth
(irb):3: warning: toplevel constant Auth referenced by Twitter::Auth
=> Auth
15. Print backtrace and error message in reverse order
AFTER:
stack frame 3
stack frame 2
stack frame 1
Main Error Message
.....
BEFORE:
Main Error Message
stack frame 1
stack frame 2
stack frame 3
.....
17. Performance improvements
◉ About 5-10% performance improvement by removing all
trace instructions from overall bytecode (instruction
sequences)
18. Performance improvements
◉ About 5-10% performance improvement by removing all
trace instructions from overall bytecode (instruction
sequences)
◉ Block passing by a block parameter
(e.g. def foo(&b); bar(&b); end)
is about 3 times faster than Ruby 2.4
19. Performance improvements
◉ About 5-10% performance improvement by removing all
trace instructions from overall bytecode (instruction
sequences)
◉ Block passing by a block parameter
(e.g. def foo(&b); bar(&b); end)
is about 3 times faster than Ruby 2.4
◉ ERB now generates code from a template twice as fast as
Ruby 2.4
20. Performance improvements
◉ About 5-10% performance improvement by removing all
trace instructions from overall bytecode (instruction
sequences)
◉ Block passing by a block parameter
(e.g. def foo(&b); bar(&b); end)
is about 3 times faster than Ruby 2.4
◉ ERB now generates code from a template twice as fast as
Ruby 2.4
◉ (and more…)
23. Other notable changes
◉ Thread.report_on_exception is now set to true by default.
◉ SecureRandom now prefers OS-provided sources over
OpenSSL
24. Other notable changes
◉ Thread.report_on_exception is now set to true by default.
◉ SecureRandom now prefers OS-provided sources over
OpenSSL
◉ Promote cmath, csv, date, dbm, etc, fcntl, fiddle, fileutils,
gdbm, ipaddr, scanf, sdbm, stringio, strscan, webrick, zlib
from standard libraries to default gems.
25. Other notable changes
◉ Thread.report_on_exception is now set to true by default.
◉ SecureRandom now prefers OS-provided sources over
OpenSSL
◉ Promote cmath, csv, date, dbm, etc, fcntl, fiddle, fileutils,
gdbm, ipaddr, scanf, sdbm, stringio, strscan, webrick, zlib
from standard libraries to default gems.
◉ Update supported Unicode version to 10.0.0.
26. Other notable changes
◉ Thread.report_on_exception is now set to true by default.
◉ SecureRandom now prefers OS-provided sources over
OpenSSL
◉ Promote cmath, csv, date, dbm, etc, fcntl, fiddle, fileutils,
gdbm, ipaddr, scanf, sdbm, stringio, strscan, webrick, zlib
from standard libraries to default gems.
◉ Update supported Unicode version to 10.0.0.
◉ Update to RubyGems 2.7.3, RDoc 6.0.1.
27. Other notable changes
◉ Thread.report_on_exception is now set to true by default.
◉ SecureRandom now prefers OS-provided sources over
OpenSSL
◉ Promote cmath, csv, date, dbm, etc, fcntl, fiddle, fileutils,
gdbm, ipaddr, scanf, sdbm, stringio, strscan, webrick, zlib
from standard libraries to default gems.
◉ Update supported Unicode version to 10.0.0.
◉ Update to RubyGems 2.7.3, RDoc 6.0.1.
◉ (and more…)