[#80531] Re: [ruby-cvs:65407] normal:r58236 (trunk): thread.c: comments on M:N threading [ci skip] — Eric Wong <normalperson@...>

SASADA Koichi <[email protected]> wrote:

24 messages 2017/04/02
[#80532] Re: [ruby-cvs:65407] normal:r58236 (trunk): thread.c: comments on M:N threading [ci skip] — SASADA Koichi <ko1@...> 2017/04/02

On 2017/04/02 11:35, Eric Wong wrote:

[#80540] Re: [ruby-cvs:65407] normal:r58236 (trunk): thread.c: comments on M:N threading [ci skip] — Eric Wong <normalperson@...> 2017/04/03

SASADA Koichi <[email protected]> wrote:

[#81027] Re: [ruby-cvs:65407] normal:r58236 (trunk): thread.c: comments on M:N threading [ci skip] — Eric Wong <normalperson@...> 2017/05/08

Eric Wong <[email protected]> wrote:

[#81028] Re: [ruby-cvs:65407] normal:r58236 (trunk): thread.c: comments on M:N threading [ci skip] — SASADA Koichi <ko1@...> 2017/05/08

On 2017/05/08 9:33, Eric Wong wrote:

[#81029] Re: [ruby-cvs:65407] normal:r58236 (trunk): thread.c: comments on M:N threading [ci skip] — SASADA Koichi <ko1@...> 2017/05/08

On 2017/05/08 10:53, SASADA Koichi wrote:

[#81031] Re: [ruby-cvs:65407] normal:r58236 (trunk): thread.c: comments on M:N threading [ci skip] — Eric Wong <normalperson@...> 2017/05/08

SASADA Koichi <[email protected]> wrote:

[#81033] Re: [ruby-cvs:65407] normal:r58236 (trunk): thread.c: comments on M:N threading [ci skip] — SASADA Koichi <ko1@...> 2017/05/08

On 2017/05/08 12:01, Eric Wong wrote:

[#81035] Re: [ruby-cvs:65407] normal:r58236 (trunk): thread.c: comments on M:N threading [ci skip] — Eric Wong <normalperson@...> 2017/05/08

SASADA Koichi <[email protected]> wrote:

[#81042] Re: [ruby-cvs:65407] normal:r58236 (trunk): thread.c: comments on M:N threading [ci skip] — SASADA Koichi <ko1@...> 2017/05/09

On 2017/05/08 15:36, Eric Wong wrote:

[#81044] Re: [ruby-cvs:65407] normal:r58236 (trunk): thread.c: comments on M:N threading [ci skip] — Eric Wong <normalperson@...> 2017/05/09

SASADA Koichi <[email protected]> wrote:

[#81045] Re: [ruby-cvs:65407] normal:r58236 (trunk): thread.c: comments on M:N threading [ci skip] — SASADA Koichi <ko1@...> 2017/05/09

On 2017/05/09 12:38, Eric Wong wrote:

[#81047] Re: [ruby-cvs:65407] normal:r58236 (trunk): thread.c: comments on M:N threading [ci skip] — Eric Wong <normalperson@...> 2017/05/09

SASADA Koichi <[email protected]> wrote:

[#80892] [Ruby trunk Misc#13514] [PATCH] thread_pthread.c (native_sleep): preserve old unblock function — ko1@...

Issue #13514 has been updated by ko1 (Koichi Sasada).

8 messages 2017/04/26

[ruby-core:80681] [Ruby trunk Feature#13383] [PATCH] Module#source_location

From: shevegen@...
Date: 2017-04-13 19:10:54 UTC
List: ruby-core #80681
Issue #13383 has been updated by shevegen (Robert A. Heiler).


I am also for this if it is easily possible.

I remember many years ago in the ruby 1.8.x days, before pry, 
I twiddled and played with the programming language Io.

I do not remember much about it, but one argument that it
said in its favour (aside from being small/lightweight) 
was that it allowed introspection at run-time of pretty
much everything. (I do not remember if this was correct
or perhaps I may misremember.)

Since that, ruby got a lot more introspection support,
pry, also .source_location and being able to pull in 
the method body and method comments (I think one of the
gems of pry does that).

I always found this awesome.

Anyway to come back to the suggestion by Hidekazu Kobayashi,
I agree. It would be nice to have full introspection of
everything in ruby at run-time. We got a lot more access
to all these various things these day, with the RubyVM and
objectspace showing memory even of a "namespace" like:

Like in my irb:

  require 'objspace'; ObjectSpace.memsize_of([])     # => 20
  require 'objspace'; ObjectSpace.memsize_of(Kernel) # => 2340
  require 'objspace'; ObjectSpace.memsize_of(Object) # => 6484

I think that all of this is very cool. :)

----------------------------------------
Feature #13383: [PATCH] Module#source_location
https://bugs.ruby-lang.org/issues/13383#change-64218

* Author: koba789 (Hidekazu Kobayashi)
* Status: Open
* Priority: Normal
* Assignee: 
* Target version: 
----------------------------------------
# Abstract

It can inspect where the module or class is defined.

# Background

In debugging or development an application, I usually want to find out where the class definition of using library.
There is Method#source_location but I could not find **Class** easily.

# Implementation

In Github: https://github.com/ruby/ruby/pull/1562




-- 
https://bugs.ruby-lang.org/

Unsubscribe: <mailto:[email protected]?subject=unsubscribe>
<http://lists.ruby-lang.org/cgi-bin/mailman/options/ruby-core>

In This Thread

Prev Next