Feature #5666
closedMake rb_path2class public
Description
I would like to make rb_path2class public C api. I've attached a patch to make it happen along with updates to README.EXT and README.EXT.ja.
Files
Updated by wycats (Yehuda Katz) almost 13 years ago
While we're at it, can we create a version of this exposed to Ruby?
Something like Module#path_to_module would be great. We already have a bunch of code in Rails to handle it, but I always wished it was just exposed directly into Ruby.
Updated by kosaki (Motohiro KOSAKI) almost 13 years ago
If we expose rb_path2class(char*), we maybe need to expose rb_path_to_class(VALUE) too. because rb_path2class() is convenient and M17N unaware function, and rb_path_to_class() has full power.
Plus, I don't think your proposed doc is very clear.
To look up a constant by a C string, use the function below:
- Why constant, not class?
- Which string should be passed?
btw, I also don't think path2class() is good name because `path' has unclear meaning and many people imagine it's directory path. but we can't change it anymore....
Updated by naruse (Yui NARUSE) almost 13 years ago
Yehuda Katz wrote:
While we're at it, can we create a version of this exposed to Ruby?
Something like Module#path_to_module would be great. We already have a bunch of code in Rails to handle it, but I always wished it was just exposed directly into Ruby.
Could you make a ticket about it?
It is another issue.
Updated by mame (Yusuke Endoh) over 12 years ago
- Status changed from Open to Assigned
- Assignee set to tenderlovemaking (Aaron Patterson)
Aaron-san, could you answer Kosaki's comment?
--
Yusuke Endoh mame@tsg.ne.jp
Updated by tenderlovemaking (Aaron Patterson) over 12 years ago
- Status changed from Assigned to Closed
This is a dup of #5690, so I'm closing it.