Hi,
While I was just fixing a bug in current head and had to test the
fix anyway I assumed I could easily modify the ruby code needing
to be adapted anyway to a more ruby-like style.
I replaced the common usage of hash access with default parameter by
YCP Code --> Ruby like replacement
part["fsid"]:0 --> (part["fsid"]||0)
part["type"]:`none --> (part["type"]||:none)
substring(part["device"]:"",0,9) --> part["device"][0,9]
Could someone with more ruby experience tell me if these replacements
are reasonable? My testing showed they work, but I am not sure if there
are pitfalls I am not aware of.
Tschuess,
Thomas Fehr
--
Thomas Fehr, SuSE Linux Products GmbH, Maxfeldstr. 5, 90409 Nuernberg, Germany
GF: Jeff Hawn, Jennifer Guild, Felix Imendörffer, HRB 16746 (AG Nürnberg)
Tel: +49-911-74053-0, Fax: +49-911-74053-482, Email: [email protected]
GPG public key available.
--
To unsubscribe, e-mail: [email protected]
To contact the owner, e-mail: [email protected]