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
60
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
130
Agile Design
rickliu
0
77
Active Job in Rails 4.2
rickliu
0
56
Other Decks in Programming
See All in Programming
251126 TestState APIってなんだっけ?Step Functionsテストどう変わる?
east_takumi
0
110
connect-python: convenient protobuf RPC for Python
anuraaga
0
230
予防に勝る防御なし(2025年版) - 堅牢なコードを導く様々な設計のヒント / Growing Reliable Code PHP Conference Fukuoka 2025
twada
PRO
39
13k
Promise.tryで実現する新しいエラーハンドリング New error handling with Promise try
bicstone
3
1.5k
Flutterアプリ運用の現場で役立った監視Tips 5選
ostk0069
1
520
全員アーキテクトで挑む、 巨大で高密度なドメインの紐解き方
agatan
7
9.3k
Phronetic Team with AI - Agile Japan 2025 closing
hiranabe
2
670
開発生産性が組織文化になるまでの軌跡
tonegawa07
0
190
DartASTとその活用
sotaatos
2
150
例外処理を理解して、設計段階からエラーを見つけやすく、起こりにくく #phpconfuk
kajitack
12
6.4k
Honoを技術選定したAI要件定義プラットフォームAcsimでの意思決定
codenote
0
260
GeistFabrik and AI-augmented software development
adewale
PRO
0
160
Featured
See All Featured
The Success of Rails: Ensuring Growth for the Next 100 Years
eileencodes
46
7.8k
Speed Design
sergeychernyshev
33
1.2k
GitHub's CSS Performance
jonrohan
1032
470k
個人開発の失敗を避けるイケてる考え方 / tips for indie hackers
panda_program
118
20k
Bash Introduction
62gerente
615
210k
How GitHub (no longer) Works
holman
315
140k
Agile that works and the tools we love
rasmusluckow
331
21k
No one is an island. Learnings from fostering a developers community.
thoeni
21
3.5k
Fight the Zombie Pattern Library - RWD Summit 2016
marcelosomers
234
17k
Refactoring Trust on Your Teams (GOTO; Chicago 2020)
rmw
35
3.2k
Responsive Adventures: Dirty Tricks From The Dark Corners of Front-End
smashingmag
253
22k
Six Lessons from altMBA
skipperchong
29
4.1k
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 &.+