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
0
59
Safe Navigation in Ruby 2.3
Introduction the new operator and its problem.
Rick Liu
January 22, 2016
Tweet
Share
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
120
Agile Design
rickliu
0
76
Active Job in Rails 4.2
rickliu
0
55
Other Decks in Programming
See All in Programming
テストカバレッジ100%を10年続けて得られた学びと品質
mottyzzz
2
370
Namespace and Its Future
tagomoris
6
670
The Past, Present, and Future of Enterprise Java
ivargrimstad
0
280
Jakarta EE Core Profile and Helidon - Speed, Simplicity, and AI Integration
ivargrimstad
0
280
ECS初心者の仲間 – TUIツール「e1s」の紹介
keidarcy
0
140
Microsoft Orleans, Daprのアクターモデルを使い効率的に開発、デプロイを行うためのSekibanの試行錯誤 / Sekiban: Exploring Efficient Development and Deployment with Microsoft Orleans and Dapr Actor Models
tomohisa
0
220
Google I/O recap web編 大分Web祭り2025
kponda
0
2.9k
開発チーム・開発組織の設計改善スキルの向上
masuda220
PRO
17
9.5k
JSONataを使ってみよう Step Functionsが楽しくなる実践テクニック #devio2025
dafujii
0
220
rage against annotate_predecessor
junk0612
0
150
Zendeskのチケットを Amazon Bedrockで 解析した
ryokosuge
3
230
Langfuseと歩む生成AI活用推進
licux
3
320
Featured
See All Featured
Documentation Writing (for coders)
carmenintech
73
5k
How to Think Like a Performance Engineer
csswizardry
26
1.9k
個人開発の失敗を避けるイケてる考え方 / tips for indie hackers
panda_program
110
20k
"I'm Feeling Lucky" - Building Great Search Experiences for Today's Users (#IAC19)
danielanewman
229
22k
Put a Button on it: Removing Barriers to Going Fast.
kastner
60
4k
The Art of Delivering Value - GDevCon NA Keynote
reverentgeek
15
1.6k
Building Applications with DynamoDB
mza
96
6.6k
How to Ace a Technical Interview
jacobian
279
23k
Music & Morning Musume
bryan
46
6.8k
The Psychology of Web Performance [Beyond Tellerrand 2023]
tammyeverts
49
3k
Unsuck your backbone
ammeep
671
58k
The Web Performance Landscape in 2024 [PerfNow 2024]
tammyeverts
9
790
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 &.+