SlideShare une entreprise Scribd logo
1  sur  29
Télécharger pour lire hors ligne
RUBY 2.5
IRENEUSZ SKROBIŚ
Lead developer @ SELLEO
AGENDA
AGENDA
new features
AGENDA
new features
performance
improvements
AGENDA
new features
performance
improvements
other notable
changes
New features
1
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
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
Hash#slice & Hash#except
{ a: 1, b: 2, c: 3, d: 4 }.slice(:a, :b)
# => { a: 1, b: 2 }
{ a: 1, b: 2, c: 3, d: 4 }.except(:a, :b)
# => { c: 3, d: 4 }
Hash#transform_keys
{ a: 1, b: 2 }.transform_keys { |k| k.to_s }
=> { "a"=>1, "b"=>2 }
Struct.new can create classes that accept keyword arguments
Point = Struct.new(:x, :y, :color)
point1 = Point.create(x: 1, y: 2)
# => Point<x: 1, y: 2, color: nil>
point2 = Point.create!(x: 1, y: 2)
# => ArgumentError, color not specified.
Enumerable#any?, all?, none?, and one? accept a pattern argument
[1, 3.14, 2ri].all?(Numeric) # => true
if should_be_all_symbols.any?(String)
...
end
some_strings.none?(/aeiou/i)
Array#prepend/append as aliases of unshift/push
array = [3, 4]
array.prepend(1, 2) #=> [1, 2, 3, 4]
array #=> [1, 2, 3, 4]
array = [1, 2]
array.append(3, 4) #=> [1, 2, 3, 4]
array #=> [1, 2, 3, 4]
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
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
.....
Performance improvements
2
Performance improvements
◉ About 5-10% performance improvement by removing all
trace instructions from overall bytecode (instruction
sequences)
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
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
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…)
Other notable changes
3
Other notable changes
◉ Thread.report_on_exception is now set to true by default.
Other notable changes
◉ Thread.report_on_exception is now set to true by default.
◉ SecureRandom now prefers OS-provided sources over
OpenSSL
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.
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.
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.
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…)
SUMMARY
new features
performance
improvements
other notable
changes
THANKS!
Live long and prosper :)
Ireneusz Skrobiś
@ireneuszskrobis

Contenu connexe

Tendances

Server::Starter meets Java
Server::Starter meets JavaServer::Starter meets Java
Server::Starter meets Java
Tokuhiro Matsuno
 
Stackless Python In Eve
Stackless Python In EveStackless Python In Eve
Stackless Python In Eve
l xf
 
Deploy, Scale and Sleep at Night with JRuby
Deploy, Scale and Sleep at Night with JRubyDeploy, Scale and Sleep at Night with JRuby
Deploy, Scale and Sleep at Night with JRuby
Joe Kutner
 
I/O, You Own: Regaining Control of Your Disk in the Presence of Bootkits
I/O, You Own: Regaining Control of Your Disk in the Presence of BootkitsI/O, You Own: Regaining Control of Your Disk in the Presence of Bootkits
I/O, You Own: Regaining Control of Your Disk in the Presence of Bootkits
CrowdStrike
 

Tendances (20)

Devel::NYTProf 2009-07 (OUTDATED, see 201008)
Devel::NYTProf 2009-07 (OUTDATED, see 201008)Devel::NYTProf 2009-07 (OUTDATED, see 201008)
Devel::NYTProf 2009-07 (OUTDATED, see 201008)
 
PL/Perl - New Features in PostgreSQL 9.0
PL/Perl - New Features in PostgreSQL 9.0PL/Perl - New Features in PostgreSQL 9.0
PL/Perl - New Features in PostgreSQL 9.0
 
Fabric Fast & Furious edition
Fabric Fast & Furious editionFabric Fast & Furious edition
Fabric Fast & Furious edition
 
Terraform Immutablish Infrastructure with Consul-Template
Terraform Immutablish Infrastructure with Consul-TemplateTerraform Immutablish Infrastructure with Consul-Template
Terraform Immutablish Infrastructure with Consul-Template
 
Setup 3 Node Kafka Cluster on AWS - Hands On
Setup 3 Node Kafka Cluster on AWS - Hands OnSetup 3 Node Kafka Cluster on AWS - Hands On
Setup 3 Node Kafka Cluster on AWS - Hands On
 
Capistrano, Puppet, and Chef
Capistrano, Puppet, and ChefCapistrano, Puppet, and Chef
Capistrano, Puppet, and Chef
 
Exploring Code with Pry!
Exploring Code with Pry!Exploring Code with Pry!
Exploring Code with Pry!
 
Powershell alias
Powershell aliasPowershell alias
Powershell alias
 
Working with databases in Perl
Working with databases in PerlWorking with databases in Perl
Working with databases in Perl
 
Server::Starter meets Java
Server::Starter meets JavaServer::Starter meets Java
Server::Starter meets Java
 
Stackless Python In Eve
Stackless Python In EveStackless Python In Eve
Stackless Python In Eve
 
Tuning Solr for Logs
Tuning Solr for LogsTuning Solr for Logs
Tuning Solr for Logs
 
CoreOS + Kubernetes @ All Things Open 2015
CoreOS + Kubernetes @ All Things Open 2015CoreOS + Kubernetes @ All Things Open 2015
CoreOS + Kubernetes @ All Things Open 2015
 
Real Time Analytics - Stream Processing (Colombo big data meetup 18/05/2017)
Real Time Analytics - Stream Processing (Colombo big data meetup 18/05/2017)Real Time Analytics - Stream Processing (Colombo big data meetup 18/05/2017)
Real Time Analytics - Stream Processing (Colombo big data meetup 18/05/2017)
 
Deploy, Scale and Sleep at Night with JRuby
Deploy, Scale and Sleep at Night with JRubyDeploy, Scale and Sleep at Night with JRuby
Deploy, Scale and Sleep at Night with JRuby
 
I/O, You Own: Regaining Control of Your Disk in the Presence of Bootkits
I/O, You Own: Regaining Control of Your Disk in the Presence of BootkitsI/O, You Own: Regaining Control of Your Disk in the Presence of Bootkits
I/O, You Own: Regaining Control of Your Disk in the Presence of Bootkits
 
PHP Optimization
PHP OptimizationPHP Optimization
PHP Optimization
 
Power of Puppet 4
Power of Puppet 4Power of Puppet 4
Power of Puppet 4
 
JavaOne 2015 Java Mixed-Mode Flame Graphs
JavaOne 2015 Java Mixed-Mode Flame GraphsJavaOne 2015 Java Mixed-Mode Flame Graphs
JavaOne 2015 Java Mixed-Mode Flame Graphs
 
Mysqlnd, an unknown powerful PHP extension
Mysqlnd, an unknown powerful PHP extensionMysqlnd, an unknown powerful PHP extension
Mysqlnd, an unknown powerful PHP extension
 

Similaire à New features in Ruby 2.5

Testing NodeJS with Mocha, Should, Sinon, and JSCoverage
Testing NodeJS with Mocha, Should, Sinon, and JSCoverageTesting NodeJS with Mocha, Should, Sinon, and JSCoverage
Testing NodeJS with Mocha, Should, Sinon, and JSCoverage
mlilley
 
Python Deployment with Fabric
Python Deployment with FabricPython Deployment with Fabric
Python Deployment with Fabric
andymccurdy
 

Similaire à New features in Ruby 2.5 (20)

Course 102: Lecture 8: Composite Commands
Course 102: Lecture 8: Composite Commands Course 102: Lecture 8: Composite Commands
Course 102: Lecture 8: Composite Commands
 
Testing NodeJS with Mocha, Should, Sinon, and JSCoverage
Testing NodeJS with Mocha, Should, Sinon, and JSCoverageTesting NodeJS with Mocha, Should, Sinon, and JSCoverage
Testing NodeJS with Mocha, Should, Sinon, and JSCoverage
 
More on bpftrace for MariaDB DBAs and Developers - FOSDEM 2022 MariaDB Devroom
More on bpftrace for MariaDB DBAs and Developers - FOSDEM 2022 MariaDB DevroomMore on bpftrace for MariaDB DBAs and Developers - FOSDEM 2022 MariaDB Devroom
More on bpftrace for MariaDB DBAs and Developers - FOSDEM 2022 MariaDB Devroom
 
The Hitchhiker's Guide to Faster Builds. Viktor Kirilov. CoreHard Spring 2019
The Hitchhiker's Guide to Faster Builds. Viktor Kirilov. CoreHard Spring 2019The Hitchhiker's Guide to Faster Builds. Viktor Kirilov. CoreHard Spring 2019
The Hitchhiker's Guide to Faster Builds. Viktor Kirilov. CoreHard Spring 2019
 
Toolbox of a Ruby Team
Toolbox of a Ruby TeamToolbox of a Ruby Team
Toolbox of a Ruby Team
 
CoreOS, or How I Learned to Stop Worrying and Love Systemd
CoreOS, or How I Learned to Stop Worrying and Love SystemdCoreOS, or How I Learned to Stop Worrying and Love Systemd
CoreOS, or How I Learned to Stop Worrying and Love Systemd
 
Gun make
Gun makeGun make
Gun make
 
Infrastructureascode slideshare-160331143725
Infrastructureascode slideshare-160331143725Infrastructureascode slideshare-160331143725
Infrastructureascode slideshare-160331143725
 
Infrastructureascode slideshare-160331143725
Infrastructureascode slideshare-160331143725Infrastructureascode slideshare-160331143725
Infrastructureascode slideshare-160331143725
 
Infrastructure as code: running microservices on AWS using Docker, Terraform,...
Infrastructure as code: running microservices on AWS using Docker, Terraform,...Infrastructure as code: running microservices on AWS using Docker, Terraform,...
Infrastructure as code: running microservices on AWS using Docker, Terraform,...
 
stackconf 2022: Cluster Management: Heterogeneous, Lightweight, Safe. Pick Three
stackconf 2022: Cluster Management: Heterogeneous, Lightweight, Safe. Pick Threestackconf 2022: Cluster Management: Heterogeneous, Lightweight, Safe. Pick Three
stackconf 2022: Cluster Management: Heterogeneous, Lightweight, Safe. Pick Three
 
running stable diffusion on android
running stable diffusion on androidrunning stable diffusion on android
running stable diffusion on android
 
TorqueBox: The beauty of Ruby with the power of JBoss. Presented at Devnexus...
TorqueBox: The beauty of Ruby with the power of JBoss.  Presented at Devnexus...TorqueBox: The beauty of Ruby with the power of JBoss.  Presented at Devnexus...
TorqueBox: The beauty of Ruby with the power of JBoss. Presented at Devnexus...
 
Debugging Python with gdb
Debugging Python with gdbDebugging Python with gdb
Debugging Python with gdb
 
The why and how of moving to PHP 5.5/5.6
The why and how of moving to PHP 5.5/5.6The why and how of moving to PHP 5.5/5.6
The why and how of moving to PHP 5.5/5.6
 
Python Deployment with Fabric
Python Deployment with FabricPython Deployment with Fabric
Python Deployment with Fabric
 
How it's made: C++ compilers (GCC)
How it's made: C++ compilers (GCC)How it's made: C++ compilers (GCC)
How it's made: C++ compilers (GCC)
 
Functional Smalltalk
Functional SmalltalkFunctional Smalltalk
Functional Smalltalk
 
Live deployment, ci, drupal
Live deployment, ci, drupalLive deployment, ci, drupal
Live deployment, ci, drupal
 
Terraform Modules and Continuous Deployment
Terraform Modules and Continuous DeploymentTerraform Modules and Continuous Deployment
Terraform Modules and Continuous Deployment
 

Plus de Ireneusz Skrobiś

Plus de Ireneusz Skrobiś (8)

Bugs and non-technical client
Bugs and non-technical clientBugs and non-technical client
Bugs and non-technical client
 
PayPal Subscriptions in Ruby on Rails application
PayPal Subscriptions in Ruby on Rails applicationPayPal Subscriptions in Ruby on Rails application
PayPal Subscriptions in Ruby on Rails application
 
How to introduce a new developer to a project.
How to introduce a new developer to a project.How to introduce a new developer to a project.
How to introduce a new developer to a project.
 
Geolocation Databases in Ruby on Rails
Geolocation Databases in Ruby on RailsGeolocation Databases in Ruby on Rails
Geolocation Databases in Ruby on Rails
 
New features in Ruby 2.4
New features in Ruby 2.4New features in Ruby 2.4
New features in Ruby 2.4
 
Geocoding with Rails and Twitter Typeahead
Geocoding with Rails and Twitter TypeaheadGeocoding with Rails and Twitter Typeahead
Geocoding with Rails and Twitter Typeahead
 
LOL vs Dota2: Battle Of APIs
LOL vs Dota2: Battle Of APIsLOL vs Dota2: Battle Of APIs
LOL vs Dota2: Battle Of APIs
 
What to do when there is no API
What to do when there is no APIWhat to do when there is no API
What to do when there is no API
 

Dernier

XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
ssuser89054b
 
1_Introduction + EAM Vocabulary + how to navigate in EAM.pdf
1_Introduction + EAM Vocabulary + how to navigate in EAM.pdf1_Introduction + EAM Vocabulary + how to navigate in EAM.pdf
1_Introduction + EAM Vocabulary + how to navigate in EAM.pdf
AldoGarca30
 
Verification of thevenin's theorem for BEEE Lab (1).pptx
Verification of thevenin's theorem for BEEE Lab (1).pptxVerification of thevenin's theorem for BEEE Lab (1).pptx
Verification of thevenin's theorem for BEEE Lab (1).pptx
chumtiyababu
 
Cara Menggugurkan Sperma Yang Masuk Rahim Biyar Tidak Hamil
Cara Menggugurkan Sperma Yang Masuk Rahim Biyar Tidak HamilCara Menggugurkan Sperma Yang Masuk Rahim Biyar Tidak Hamil
Cara Menggugurkan Sperma Yang Masuk Rahim Biyar Tidak Hamil
Cara Menggugurkan Kandungan 087776558899
 
Call Girls in South Ex (delhi) call me [🔝9953056974🔝] escort service 24X7
Call Girls in South Ex (delhi) call me [🔝9953056974🔝] escort service 24X7Call Girls in South Ex (delhi) call me [🔝9953056974🔝] escort service 24X7
Call Girls in South Ex (delhi) call me [🔝9953056974🔝] escort service 24X7
9953056974 Low Rate Call Girls In Saket, Delhi NCR
 
"Lesotho Leaps Forward: A Chronicle of Transformative Developments"
"Lesotho Leaps Forward: A Chronicle of Transformative Developments""Lesotho Leaps Forward: A Chronicle of Transformative Developments"
"Lesotho Leaps Forward: A Chronicle of Transformative Developments"
mphochane1998
 

Dernier (20)

Wadi Rum luxhotel lodge Analysis case study.pptx
Wadi Rum luxhotel lodge Analysis case study.pptxWadi Rum luxhotel lodge Analysis case study.pptx
Wadi Rum luxhotel lodge Analysis case study.pptx
 
A CASE STUDY ON CERAMIC INDUSTRY OF BANGLADESH.pptx
A CASE STUDY ON CERAMIC INDUSTRY OF BANGLADESH.pptxA CASE STUDY ON CERAMIC INDUSTRY OF BANGLADESH.pptx
A CASE STUDY ON CERAMIC INDUSTRY OF BANGLADESH.pptx
 
kiln thermal load.pptx kiln tgermal load
kiln thermal load.pptx kiln tgermal loadkiln thermal load.pptx kiln tgermal load
kiln thermal load.pptx kiln tgermal load
 
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
 
School management system project Report.pdf
School management system project Report.pdfSchool management system project Report.pdf
School management system project Report.pdf
 
AIRCANVAS[1].pdf mini project for btech students
AIRCANVAS[1].pdf mini project for btech studentsAIRCANVAS[1].pdf mini project for btech students
AIRCANVAS[1].pdf mini project for btech students
 
1_Introduction + EAM Vocabulary + how to navigate in EAM.pdf
1_Introduction + EAM Vocabulary + how to navigate in EAM.pdf1_Introduction + EAM Vocabulary + how to navigate in EAM.pdf
1_Introduction + EAM Vocabulary + how to navigate in EAM.pdf
 
Design For Accessibility: Getting it right from the start
Design For Accessibility: Getting it right from the startDesign For Accessibility: Getting it right from the start
Design For Accessibility: Getting it right from the start
 
Verification of thevenin's theorem for BEEE Lab (1).pptx
Verification of thevenin's theorem for BEEE Lab (1).pptxVerification of thevenin's theorem for BEEE Lab (1).pptx
Verification of thevenin's theorem for BEEE Lab (1).pptx
 
Unit 4_Part 1 CSE2001 Exception Handling and Function Template and Class Temp...
Unit 4_Part 1 CSE2001 Exception Handling and Function Template and Class Temp...Unit 4_Part 1 CSE2001 Exception Handling and Function Template and Class Temp...
Unit 4_Part 1 CSE2001 Exception Handling and Function Template and Class Temp...
 
Generative AI or GenAI technology based PPT
Generative AI or GenAI technology based PPTGenerative AI or GenAI technology based PPT
Generative AI or GenAI technology based PPT
 
COST-EFFETIVE and Energy Efficient BUILDINGS ptx
COST-EFFETIVE  and Energy Efficient BUILDINGS ptxCOST-EFFETIVE  and Energy Efficient BUILDINGS ptx
COST-EFFETIVE and Energy Efficient BUILDINGS ptx
 
Double Revolving field theory-how the rotor develops torque
Double Revolving field theory-how the rotor develops torqueDouble Revolving field theory-how the rotor develops torque
Double Revolving field theory-how the rotor develops torque
 
Unleashing the Power of the SORA AI lastest leap
Unleashing the Power of the SORA AI lastest leapUnleashing the Power of the SORA AI lastest leap
Unleashing the Power of the SORA AI lastest leap
 
Hostel management system project report..pdf
Hostel management system project report..pdfHostel management system project report..pdf
Hostel management system project report..pdf
 
Cara Menggugurkan Sperma Yang Masuk Rahim Biyar Tidak Hamil
Cara Menggugurkan Sperma Yang Masuk Rahim Biyar Tidak HamilCara Menggugurkan Sperma Yang Masuk Rahim Biyar Tidak Hamil
Cara Menggugurkan Sperma Yang Masuk Rahim Biyar Tidak Hamil
 
Call Girls in South Ex (delhi) call me [🔝9953056974🔝] escort service 24X7
Call Girls in South Ex (delhi) call me [🔝9953056974🔝] escort service 24X7Call Girls in South Ex (delhi) call me [🔝9953056974🔝] escort service 24X7
Call Girls in South Ex (delhi) call me [🔝9953056974🔝] escort service 24X7
 
Employee leave management system project.
Employee leave management system project.Employee leave management system project.
Employee leave management system project.
 
Block diagram reduction techniques in control systems.ppt
Block diagram reduction techniques in control systems.pptBlock diagram reduction techniques in control systems.ppt
Block diagram reduction techniques in control systems.ppt
 
"Lesotho Leaps Forward: A Chronicle of Transformative Developments"
"Lesotho Leaps Forward: A Chronicle of Transformative Developments""Lesotho Leaps Forward: A Chronicle of Transformative Developments"
"Lesotho Leaps Forward: A Chronicle of Transformative Developments"
 

New features in Ruby 2.5

  • 1. RUBY 2.5 IRENEUSZ SKROBIŚ Lead developer @ SELLEO
  • 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
  • 9. Hash#slice & Hash#except { a: 1, b: 2, c: 3, d: 4 }.slice(:a, :b) # => { a: 1, b: 2 } { a: 1, b: 2, c: 3, d: 4 }.except(:a, :b) # => { c: 3, d: 4 }
  • 10. Hash#transform_keys { a: 1, b: 2 }.transform_keys { |k| k.to_s } => { "a"=>1, "b"=>2 }
  • 11. Struct.new can create classes that accept keyword arguments Point = Struct.new(:x, :y, :color) point1 = Point.create(x: 1, y: 2) # => Point<x: 1, y: 2, color: nil> point2 = Point.create!(x: 1, y: 2) # => ArgumentError, color not specified.
  • 12. Enumerable#any?, all?, none?, and one? accept a pattern argument [1, 3.14, 2ri].all?(Numeric) # => true if should_be_all_symbols.any?(String) ... end some_strings.none?(/aeiou/i)
  • 13. Array#prepend/append as aliases of unshift/push array = [3, 4] array.prepend(1, 2) #=> [1, 2, 3, 4] array #=> [1, 2, 3, 4] array = [1, 2] array.append(3, 4) #=> [1, 2, 3, 4] array #=> [1, 2, 3, 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…)
  • 22. Other notable changes ◉ Thread.report_on_exception is now set to true by default.
  • 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…)
  • 29. THANKS! Live long and prosper :) Ireneusz Skrobiś @ireneuszskrobis