I want to know grammar names like process([command]){read}

Asked 2 years ago, Updated 2 years ago, 63 views

While reading Ruby's Redis client source code (redis 4.0.1),
lib/redis/client.rb
to a file named

def call (command)
      reply=process([command]){read}
      raise reply if reply.is_a? (CommandError)
......

It says

process([command]){read}

When I close this [] I want to google the grammar name of {}, but I don't know what word to google, so please let me know if anyone knows.

Note: June 27, 2020
This was helpful.
http://rubylearning.com/satishtalim/ruby_blocks.html

ruby redis

2022-09-30 11:15

1 Answers

It is difficult to google symbols, so in the case of Ruby, you can find the meaning by looking at the "Meaning of symbols used in Ruby" page of the reference manual.
https://docs.ruby-lang.org/ja/latest/doc/symref.html

If you want to google as an English word, would words like brackets, braces, curly braces, parents, etc. be appropriate?


2022-09-30 11:15

If you have any answers or tips


© 2024 OneMinuteCode. All rights reserved.