Upgrade to PRO for Only $50/Year—Limited-Time Offer! 🔥
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
手軽に積ん読を増やすには?/読みたい本と付き合うには?
o0h
PRO
1
170
俺流レスポンシブコーディング 2025
tak_dcxi
14
8.7k
Context is King? 〜Verifiability時代とコンテキスト設計 / Beyond "Context is King"
rkaga
9
1.1k
認証・認可の基本を学ぼう後編
kouyuume
0
190
React Native New Architecture 移行実践報告
taminif
1
150
DevFest Android in Korea 2025 - 개발자 커뮤니티를 통해 얻는 가치
wisemuji
0
140
組み合わせ爆発にのまれない - 責務分割 x テスト
halhorn
1
150
dotfiles 式年遷宮 令和最新版
masawada
1
770
JETLS.jl ─ A New Language Server for Julia
abap34
1
400
複数人でのCLI/Infrastructure as Codeの暮らしを良くする
shmokmt
5
2.3k
Giselleで作るAI QAアシスタント 〜 Pull Requestレビューに継続的QAを
codenote
0
170
開発に寄りそう自動テストの実現
goyoki
2
940
Featured
See All Featured
What’s in a name? Adding method to the madness
productmarketing
PRO
24
3.8k
[RailsConf 2023 Opening Keynote] The Magic of Rails
eileencodes
31
9.8k
Six Lessons from altMBA
skipperchong
29
4.1k
Visualization
eitanlees
150
16k
StorybookのUI Testing Handbookを読んだ
zakiyama
31
6.4k
It's Worth the Effort
3n
187
29k
Context Engineering - Making Every Token Count
addyosmani
9
510
Designing for Performance
lara
610
69k
GraphQLとの向き合い方2022年版
quramy
50
14k
Stop Working from a Prison Cell
hatefulcrawdad
273
21k
The Success of Rails: Ensuring Growth for the Next 100 Years
eileencodes
47
7.9k
The Illustrated Children's Guide to Kubernetes
chrisshort
51
51k
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 &.+