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
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
Claude Codeログ基盤の構築
giginet
PRO
7
3.4k
CDIの誤解しがちな仕様とその対処TIPS
futokiyo
0
220
Understanding Apache Lucene - More than just full-text search
spinscale
0
130
What Spring Developers Should Know About Jakarta EE
ivargrimstad
0
630
エラーログのマスキングの仕組みづくりに役立ったASTの話
kumoichi
0
250
The Past, Present, and Future of Enterprise Java
ivargrimstad
0
740
Docコメントで始める簡単ガードレール
keisukeikeda
1
120
AWS Infrastructure as Code の新機能 2025 総まとめ 〜SA 4人による怒涛のデモ祭り〜
konokenj
10
3.4k
[SF Ruby Feb'26] The Silicon Heel
palkan
0
110
API Platformを活用したPHPによる本格的なWeb API開発 / api-platform-book-intro
ttskch
1
150
安いハードウェアでVulkan
fadis
0
510
maplibre-gl-layers - 地図に移動体たくさん表示したい
kekyo
PRO
0
290
Featured
See All Featured
How to Think Like a Performance Engineer
csswizardry
28
2.5k
Mobile First: as difficult as doing things right
swwweet
225
10k
Dominate Local Search Results - an insider guide to GBP, reviews, and Local SEO
greggifford
PRO
0
110
State of Search Keynote: SEO is Dead Long Live SEO
ryanjones
0
160
GitHub's CSS Performance
jonrohan
1032
470k
Fight the Zombie Pattern Library - RWD Summit 2016
marcelosomers
234
17k
How To Stay Up To Date on Web Technology
chriscoyier
790
250k
Facilitating Awesome Meetings
lara
57
6.8k
Applied NLP in the Age of Generative AI
inesmontani
PRO
4
2.2k
Fashionably flexible responsive web design (full day workshop)
malarkey
408
66k
Scaling GitHub
holman
464
140k
世界の人気アプリ100個を分析して見えたペイウォール設計の心得
akihiro_kokubo
PRO
67
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 &.+