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
我々はなぜ「層」を分けるのか〜「関心の分離」と「抽象化」で手に入れる変更に強いシンプルな設計〜 #phperkaigi / PHPerKaigi 2026
shogogg
2
910
「接続」—パフォーマンスチューニングの最後の一手 〜点と点を結ぶ、その一瞬のために〜
kentaroutakeda
5
2.5k
CursorとClaudeCodeとCodexとOpenCodeを実際に比較してみた
terisuke
1
400
「速くなった気がする」をデータで疑う
senleaf24
0
160
ハンズオンで学ぶクラウドネイティブ
tatsukiminami
0
120
瑠璃の宝石に学ぶ技術の声の聴き方 / 【劇場版】アニメから得た学びを発表会2026 #エンジニアニメ
mazrean
0
230
実践ハーネスエンジニアリング #MOSHTech
kajitack
7
6.3k
Codex CLIのSubagentsによる並列API実装 / Parallel API Implementation with Codex CLI Subagents
takatty
2
890
ふりがな Deep Dive try! Swift Tokyo 2026
watura
0
190
ドメインイベントでビジネスロジックを解きほぐす #phpcon_odawara
kajitack
2
130
Linux Kernelの1文字のミスで 権限昇格ができた話
rqda
0
2.3k
PCOVから学ぶコードカバレッジ #phpcon_odawara
o0h
PRO
0
260
Featured
See All Featured
Future Trends and Review - Lecture 12 - Web Technologies (1019888BNR)
signer
PRO
0
3.5k
The State of eCommerce SEO: How to Win in Today's Products SERPs - #SEOweek
aleyda
2
10k
XXLCSS - How to scale CSS and keep your sanity
sugarenia
250
1.3M
技術選定の審美眼(2025年版) / Understanding the Spiral of Technologies 2025 edition
twada
PRO
118
110k
Responsive Adventures: Dirty Tricks From The Dark Corners of Front-End
smashingmag
254
22k
Into the Great Unknown - MozCon
thekraken
40
2.3k
The Cost Of JavaScript in 2023
addyosmani
55
9.8k
Sharpening the Axe: The Primacy of Toolmaking
bcantrill
46
2.8k
[RailsConf 2023 Opening Keynote] The Magic of Rails
eileencodes
31
10k
DevOps and Value Stream Thinking: Enabling flow, efficiency and business value
helenjbeal
1
160
Noah Learner - AI + Me: how we built a GSC Bulk Export data pipeline
techseoconnect
PRO
0
160
WENDY [Excerpt]
tessaabrams
9
37k
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 &.+