From: shevegen@... Date: 2020-04-16T13:12:09+00:00 Subject: [ruby-core:97919] [Ruby master Feature#16791] Shortcuts for attributes of Process::Status Issue #16791 has been updated by shevegen (Robert A. Heiler). This is not a good feature request, IMO. There is not really any explanation as to what the idea is about. Why is p pid and s existatus suddenly? And why should that be common if one can already extend these classes as-is? What is the rationale for the feature request? Even IF this were accepted as-is, I think there should be a fair description of the issue request, so that other people can understand what is going on at a later point in time. This would be more in line what is often encouraged for people to do by the ruby core team, in that they should describe (possible) use cases, benefits and drawbacks objectively. ---------------------------------------- Feature #16791: Shortcuts for attributes of Process::Status https://bugs.ruby-lang.org/issues/16791#change-85143 * Author: 0x81000000 (/ /) * Status: Open * Priority: Normal ---------------------------------------- Only code: ``` s = `csc x.cs`.sub(/.*?\n\n/m, '') puts s if s != ''; exit $?.exitstatus if $?.exitstatus > 0 system 'mono x.exe'; exit $?.exitstatus ``` ``` class Process::Status alias :p :pid alias :s :exitstatus end ``` ``` s = `csc x.cs`.sub(/.*?\n\n/m, '') puts s if s != ''; exit $?.s if $?.s > 0 system 'mono x.exe'; exit $?.s ``` -- https://bugs.ruby-lang.org/ Unsubscribe: