**figured out how to do it:** ``` ruby %P[arg1 arg2] ``` in def initialize: ``` ruby def initialize(arg1, arg2) %P[arg1 arg2] # equals to: @arg1 = arg1, @arg2 = arg2 end ``` in hash: ``` ruby a = 1 b = 2 h = %p[a b]...D1mon (Dim F)
I correctly understood that this function will be added in version 2.7? https://github.com/ruby/ruby/pull/2231/commits/7da3cdc9aa132307eff0e4376ad6a3819940fc2dD1mon (Dim F)
Feature 1: I agree that you can do anything with the help of metaprogramming, and this will have to be registered in each library. Therefore, I propose to do this at the language level (Ruby core).D1mon (Dim F)
Well, if the syntax is misleading or intersects with an existing design. Make another syntax to work, why cancel (reject) a very cool thing which will make the code smaller (write less) and it will be nice to read the code. ? Please do n...D1mon (Dim F)
**selenium** ``` ruby for el in driver.find_elements(xpath: <some_xpath>) for e1 in el.find_elements(xpath: ...) ... end for e2 in el.find_elements(xpath: ...) ... end end ``` I need to do two searches in one...D1mon (Dim F)
``` ruby obj.each {|a| a.some_method1.each {|b| ... # comes here (enter) } a.some_method2.each {|c| ... # does not enter here } } # tried and that way. also does not go for a in obj for b ...D1mon (Dim F)