Upgrade to Pro
— share decks privately, control downloads, hide ads and more …
Speaker Deck
Features
Speaker Deck
PRO
Sign in
Sign up for free
Search
Search
Safe Navigation in Ruby 2.3
Search
Rick Liu
January 22, 2016
Programming
68
0
Share
Safe Navigation in Ruby 2.3
Introduction the new operator and its problem.
Rick Liu
January 22, 2016
More Decks by Rick Liu
See All by Rick Liu
Functional Programming Concepts
rickliu
0
220
You Don't Need a JavaScript Framework
rickliu
0
130
Agile Design
rickliu
0
80
Active Job in Rails 4.2
rickliu
0
61
Other Decks in Programming
See All in Programming
AIを導入する前にやるべきこと
negima
2
320
[RubyKaigi 2026] Require Hooks
palkan
1
280
mruby on C#: From VM Implementation to Game Scripting (RubyKaigi 2026)
hadashia
2
1.5k
【26新卒研修資料】TDD実装演習
dip_tech
PRO
0
160
サプライチェーン攻撃対策「層を重ねて落ちない壁」を10日間で組み上げた話 #TechLeadConf2026
kashewnuts
1
130
(Re)make Regexp in Ruby: Democratizing internals for the JIT
makenowjust
3
970
Programming with a DJ Controller — not vibe coding
m_seki
3
750
Lightning-Fast Method Calls with Ruby 4.1 ZJIT / RubyKaigi 2026
k0kubun
3
2.3k
書籍「ユーザーストーリーマッピング」が私のバイブル
asumikam
4
470
運転動画を検索可能にする〜Cosmos-Embed1とDatabricks Vector Searchで〜/cosmos-embed1-databricks-vector-search
studio_graph
1
640
PHPでバイナリをパースして理解するASN.1
muno92
PRO
0
390
Firefoxにコントリビューションして得られた学び
ken7253
2
150
Featured
See All Featured
Ruling the World: When Life Gets Gamed
codingconduct
0
220
Principles of Awesome APIs and How to Build Them.
keavy
128
17k
YesSQL, Process and Tooling at Scale
rocio
174
15k
Designing for Timeless Needs
cassininazir
0
210
The Limits of Empathy - UXLibs8
cassininazir
1
320
How To Stay Up To Date on Web Technology
chriscoyier
790
250k
Tips & Tricks on How to Get Your First Job In Tech
honzajavorek
1
500
職位にかかわらず全員がリーダーシップを発揮するチーム作り / Building a team where everyone can demonstrate leadership regardless of position
madoxten
62
54k
Speed Design
sergeychernyshev
33
1.6k
Max Prin - Stacking Signals: How International SEO Comes Together (And Falls Apart)
techseoconnect
PRO
0
160
Are puppies a ranking factor?
jonoalderson
1
3.4k
Understanding Cognitive Biases in Performance Measurement
bluesmoon
32
2.9k
Transcript
Safe Navigation in Ruby 2.3
Safe Navigation > some_array.first.positive? > [].first.positive? (value = some_array.first) &&
value.positive? > some_array.first&.positive? # => true # => NoMethodError: undefined method `positive?' for nil:NilClass # => nil
Safe Navigation if user.account && user.account.trial? # process trial account
settings end if user.account&.trial? # process trial account settings end if user.account && user.account != previous_account # setup new account end if user.account &.!= previous_account # setup new account end &.&, &.<<, and &.+