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
Sponsored
·
SiteGround - Reliable hosting with speed, security, and support you can count on.
→
Rick Liu
January 22, 2016
Programming
0
66
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
79
Active Job in Rails 4.2
rickliu
0
58
Other Decks in Programming
See All in Programming
DevinとClaude Code、SREの現場で使い倒してみた件
karia
1
1.1k
The free-lunch guide to idea circularity
hollycummins
0
270
コードレビューをしない選択 #でぃーぷらすトウキョウ
kajitack
3
1k
今からFlash開発できるわけないじゃん、ムリムリ! (※ムリじゃなかった!?)
arkw
0
110
PHPのバージョンアップ時にも役立ったAST(2026年版)
matsuo_atsushi
0
140
API Platformを活用したPHPによる本格的なWeb API開発 / api-platform-book-intro
ttskch
1
150
OTP を自動で入力する裏技
megabitsenmzq
0
120
Claude Code Skill入門
mayahoney
0
400
new(1.26) ← これすき / kamakura.go #8
utgwkk
0
2.5k
AI Assistants for Your Angular Solutions
manfredsteyer
PRO
0
150
Vuetify 3 → 4 何が変わった?差分と移行ポイント10分まとめ
koukimiura
0
150
S3ストレージクラスの「見える」「ある」「使える」は全部違う ─ 体験から見た、仕様の深淵を覗く
ya_ma23
0
730
Featured
See All Featured
SEO in 2025: How to Prepare for the Future of Search
ipullrank
3
3.4k
Ten Tips & Tricks for a 🌱 transition
stuffmc
0
90
Utilizing Notion as your number one productivity tool
mfonobong
4
260
AI Search: Implications for SEO and How to Move Forward - #ShenzhenSEOConference
aleyda
1
1.2k
Future Trends and Review - Lecture 12 - Web Technologies (1019888BNR)
signer
PRO
0
3.3k
Marketing Yourself as an Engineer | Alaka | Gurzu
gurzu
0
150
Navigating the Design Leadership Dip - Product Design Week Design Leaders+ Conference 2024
apolaine
0
230
svc-hook: hooking system calls on ARM64 by binary rewriting
retrage
2
180
Noah Learner - AI + Me: how we built a GSC Bulk Export data pipeline
techseoconnect
PRO
0
140
Avoiding the “Bad Training, Faster” Trap in the Age of AI
tmiket
0
100
GraphQLとの向き合い方2022年版
quramy
50
14k
Imperfection Machines: The Place of Print at Facebook
scottboms
269
14k
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 &.+