Search snippets
Browse Code Answers
FAQ
Usage docs
Log In
Sign Up
Home
Ruby
ruby try catch variable and assign nil value
user576510
Programming language:
Ruby
2021-02-28 04:16:36
0
Q:
ruby try catch variable and assign nil value
Lee Jay
Code:
Ruby
2021-02-28 04:25:34
test = a_function_that_will_fail rescue "I crashed!" test # => "I crashed"
0
Tags
value
variable
sign
var
Related
rails if else assignment one liner
ruby assign value to hash
ruby initialize empty variable
ruby each array
infinite loop in ruby
ruby case assignment
ruby case statement
change key value hash ruby
Ruby difference between for and .each
ruby optional arguments
ruby string equality
returning objects in alphabetical order in ruby
infinite loop ruby
ruby ternary operator
ruby hash transform keys
rails update without validation
ruby each do method
how to add two variables into a hash ruby
New to Communities?
Join the community