[#84280] [Ruby trunk Bug#14181] hangs or deadlocks from waitpid, threads, and trapping SIGCHLD — nobu@...
Issue #14181 has been updated by nobu (Nobuyoshi Nakada).
3 messages
2017/12/15
[#84398] [Ruby trunk Bug#14220] WEBrick changes - failures on MSWIN, MinGW — Greg.mpls@...
Issue #14220 has been reported by MSP-Greg (Greg L).
3 messages
2017/12/22
[#84472] Re: [ruby-dev:50394] [Ruby trunk Bug#14240] warn four special variables: $; $, $/ $\ — Eric Wong <normalperson@...>
Shouldn't English posts be on ruby-core instead of ruby-dev?
3 messages
2017/12/26
[ruby-core:84458] [Ruby trunk Feature#4824] Provide method Kernel#executed?
From:
mame@...
Date:
2017-12-26 07:22:50 UTC
List:
ruby-core #84458
Issue #4824 has been updated by mame (Yusuke Endoh). The names (or APIs) suggested so far: ``` executed? required? main? first_script? main_script? run_script? is_executed? is_program? defined?(__MAIN__) __FILE__.main? FILE.executed? directly_executed? standalone? loaded? __MAIN__ File.main? File.from_here? main.main? ``` ---------------------------------------- Feature #4824: Provide method Kernel#executed? https://bugs.ruby-lang.org/issues/4824#change-68961 * Author: lazaridis.com (Lazaridis Ilias) * Status: Assigned * Priority: Normal * Assignee: matz (Yukihiro Matsumoto) * Target version: ---------------------------------------- The current construct to execute main code looks not very elegant: ~~~ruby if __FILE__ == $0 my_main() # call any method or execute any code end ~~~ With a `Kernel#executed?` method, this would become more elegant: ~~~ruby if executed? #do this #do that my_main() end ~~~ or ~~~ruby main() if executed? ~~~ This addition would not break any existent behaviour. -- https://bugs.ruby-lang.org/ Unsubscribe: <mailto:ruby-core-request@ruby-lang.org?subject=unsubscribe> <http://lists.ruby-lang.org/cgi-bin/mailman/options/ruby-core>