Upgrade to Pro
— share decks privately, control downloads, hide ads and more …
Speaker Deck
Sign up for free
Menu
Search
Features
All features
Private URLs
Password Protection
Custom URLS
Scheduled publishing
Remove Branding
Restrict embedding
Deck Collections
Notes
Features
All features
Private URLs
Password Protection
Custom URLS
Scheduled publishing
Remove Branding
Restrict embedding
Deck Collections
Notes
Explore
Featured decks
Featured speakers
Programming
Technology
Storyboards
Explore
Featured decks
Featured speakers
Programming
Technology
Storyboards
Pricing
Search
Sign in
Sign up for free
Safe Navigation in Ruby 2.3
Search
Rick Liu
January 22, 2016
Programming
74
0
Share
Embed
Copy iframe code
Copy JS code
Copy link
Start on current slide
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
240
You Don't Need a JavaScript Framework
rickliu
0
130
Agile Design
rickliu
0
85
Active Job in Rails 4.2
rickliu
0
65
Other Decks in Programming
See All in Programming
複雑なUIコンポーネントとの ⻑い付き合い⽅:波及するバグからテスト戦略を経て、安全な再設計へ
mixplace
0
410
パズルゲームの作り方 / how to make puzzle games
kaityo256
PRO
2
290
Kotlinの15年とServer-Side Kotlin
n_takehata
1
150
Apple Intelligence を用いた個人情報誤送信防止、及びユーザーリクエスト体験の改善について
yukiny
0
350
現場と育てるRailsモデリング 〜Spreadsheetから始めたモデル設計〜
siroemk
2
590
Simple Storage Service(S3) is not simple
iwatsukayura
0
290
PumaからFalconに移行したRailsアプリケーションでの実践
falcon8823
0
170
AIで開発が速くなった先で、開発チームは何を目指すか
shihochan
0
920
外から家のPCの電源入れたい!をPHPで解決する
kawashimo0
1
130
AIに “答え“を書かせるのを やめてみた
___akari11
0
120
ジョジョの世界をXRで再現する
mofurune
0
160
Vue Fes Japan の “作る側”に関わってみて
naokihaba
0
160
Featured
See All Featured
A designer walks into a library…
pauljervisheath
211
25k
Optimising Largest Contentful Paint
csswizardry
37
4k
Neural Spatial Audio Processing for Sound Field Analysis and Control
skoyamalab
0
570
jQuery: Nuts, Bolts and Bling
dougneiner
66
8.6k
How to Think Like a Performance Engineer
csswizardry
28
2.9k
Digital Ethics as a Driver of Design Innovation
axbom
PRO
1
460
16th Malabo Montpellier Forum Presentation
akademiya2063
PRO
0
410
The MySQL Ecosystem @ GitHub 2015
samlambert
251
13k
SEO in 2025: How to Prepare for the Future of Search
ipullrank
3
3.9k
The Art of Programming - Codeland 2020
erikaheidi
57
14k
Paper Plane
katiecoart
PRO
5
54k
Distributed Sagas: A Protocol for Coordinating Microservices
caitiem20
333
23k
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 &.+