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
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
Package Management Learnings from Homebrew
mikemcquaid
0
220
CSC307 Lecture 08
javiergs
PRO
0
670
SourceGeneratorのススメ
htkym
0
190
Patterns of Patterns
denyspoltorak
0
1.4k
Spinner 軸ズレ現象を調べたらレンダリング深淵に飲まれた #レバテックMeetup
bengo4com
1
230
AI巻き込み型コードレビューのススメ
nealle
1
210
AI前提で考えるiOSアプリのモダナイズ設計
yuukiw00w
0
230
AIと一緒にレガシーに向き合ってみた
nyafunta9858
0
230
QAフローを最適化し、品質水準を満たしながらリリースまでの期間を最短化する #RSGT2026
shibayu36
2
4.4k
CSC307 Lecture 01
javiergs
PRO
0
690
AIエージェント、”どう作るか”で差は出るか? / AI Agents: Does the "How" Make a Difference?
rkaga
4
2k
CSC307 Lecture 07
javiergs
PRO
0
550
Featured
See All Featured
ピンチをチャンスに:未来をつくるプロダクトロードマップ #pmconf2020
aki_iinuma
128
55k
Darren the Foodie - Storyboard
khoart
PRO
2
2.4k
Art, The Web, and Tiny UX
lynnandtonic
304
21k
The Success of Rails: Ensuring Growth for the Next 100 Years
eileencodes
47
7.9k
Creating an realtime collaboration tool: Agile Flush - .NET Oxford
marcduiker
35
2.4k
CSS Pre-Processors: Stylus, Less & Sass
bermonpainter
359
30k
GraphQLの誤解/rethinking-graphql
sonatard
74
11k
[SF Ruby Conf 2025] Rails X
palkan
1
750
Evolving SEO for Evolving Search Engines
ryanjones
0
120
A Modern Web Designer's Workflow
chriscoyier
698
190k
Crafting Experiences
bethany
1
48
Designing for humans not robots
tammielis
254
26k
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 &.+