[yast-devel] What's new in ruby 2.3
Hi, I found this article that seems to be quite easy to understand quick intro what will be new in ruby 2.3 https://blog.blockscore.com/new-features-in-ruby-2-3/ For me the most interesting part is new dig method, with it we can easily replace ycp old one get with multiple elements. Also unlike author I can find also example for using Hash.to_proc with mapping backended by constant HASH like. ``` MAPPING = { true => "yes", false => "no", nil => "" } values.map(&MAPPING) ``` which can convert list of values from boolean to given mapping. Also it is quite nice for us when using old ycp code to use new "try" syntax in ruby with "&." For complete list of changes see https://github.com/ruby/ruby/blob/v2_3_0_preview1/NEWS -- To unsubscribe, e-mail: yast-devel+unsubscribe@opensuse.org To contact the owner, e-mail: yast-devel+owner@opensuse.org
participants (1)
-
Josef Reidinger