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
·
Your Podcast. Everywhere. Effortlessly.
Share. Educate. Inspire. Entertain. You do you. We'll handle the rest.
→
Rick Liu
January 22, 2016
Programming
0
62
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
78
Active Job in Rails 4.2
rickliu
0
57
Other Decks in Programming
See All in Programming
ぼくの開発環境2026
yuzneri
0
220
Data-Centric Kaggle
isax1015
2
770
AI時代のキャリアプラン「技術の引力」からの脱出と「問い」へのいざない / tech-gravity
minodriven
21
7.2k
Architectural Extensions
denyspoltorak
0
280
CSC307 Lecture 02
javiergs
PRO
1
780
0→1 フロントエンド開発 Tips🚀 #レバテックMeetup
bengo4com
0
560
AIエージェント、”どう作るか”で差は出るか? / AI Agents: Does the "How" Make a Difference?
rkaga
4
2k
AIフル活用時代だからこそ学んでおきたい働き方の心得
shinoyu
0
130
なるべく楽してバックエンドに型をつけたい!(楽とは言ってない)
hibiki_cube
0
140
コマンドとリード間の連携に対する脅威分析フレームワーク
pandayumi
1
450
AI Schema Enrichment for your Oracle AI Database
thatjeffsmith
0
280
QAフローを最適化し、品質水準を満たしながらリリースまでの期間を最短化する #RSGT2026
shibayu36
2
4.4k
Featured
See All Featured
Ten Tips & Tricks for a 🌱 transition
stuffmc
0
66
WCS-LA-2024
lcolladotor
0
450
Crafting Experiences
bethany
1
48
Leadership Guide Workshop - DevTernity 2021
reverentgeek
1
200
XXLCSS - How to scale CSS and keep your sanity
sugarenia
249
1.3M
Between Models and Reality
mayunak
1
190
Visual Storytelling: How to be a Superhuman Communicator
reverentgeek
2
430
I Don’t Have Time: Getting Over the Fear to Launch Your Podcast
jcasabona
34
2.6k
Marketing to machines
jonoalderson
1
4.6k
Are puppies a ranking factor?
jonoalderson
1
2.7k
Abbi's Birthday
coloredviolet
1
4.7k
ピンチをチャンスに:未来をつくるプロダクトロードマップ #pmconf2020
aki_iinuma
128
55k
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 &.+