Assignment to multiple variables with the ternary operator

I had to confront the ruby code for the first time in 10 years


$ ruby -e 'i, j = 1 ? [1,2]:[3,4] ; p i, j'

It's like a fool who worried for a few hours because of this

Recommended Posts

Assignment to multiple variables with the ternary operator
About the ternary operator
How to change the action with multiple submit buttons
Is the ternary operator evil?
A confused story about a ternary operator with multiple conditional expressions
Today's memo (subscript operator, multiple assignment)
MASCHINE test Linear Regression with Multiple Variables
Try using || instead of the ternary operator
How do you write the ternary operator (? :)
I was addicted to unit testing with the buffer operator in RxJava
[Rails] How to register multiple records in the intermediate table with many-to-many association
Print forms directly to the printer with JasperReports
How to save to multiple tables with one input
How to create multiple pull-down menus with ActiveHash
pass two arguments to the URI with link_to
How to create member variables with JPA Model
Getting Started with Doma-Introduction to the Criteria API
Try to summarize the common layout with rails
I want to change the path after new registration after logging in with multiple devises.
Reference ternary operator
I want to hit the API with Rails on multiple docker-composes set up locally
A warning is displayed when trying to use a huge integer with the special variables $ 1, $ 2, $ 3 ...
How to embed JavaScript variables in HTML with Thymeleaf
I want to dark mode with the SWT app
[Java] Refer to and set private variables with reflection
Organized how to interact with the JDK in stages
HTTPS connection with Java to the self-signed certificate server
Addicted to the webpacker that comes standard with Rails 6
How to use the same Mapper class in multiple data sources with Spring Boot + MyBatis