1
0
Fork 0
mirror of https://github.com/ruby/ruby.git synced 2022-11-09 12:17:21 -05:00

* proc.c (proc_to_s): show is_lambda.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@12583 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
akr 2007-06-22 10:34:19 +00:00
parent 0bc84af1f9
commit e2bc064096
2 changed files with 9 additions and 3 deletions

View file

@ -1,3 +1,7 @@
Fri Jun 22 19:33:49 2007 Tanaka Akira <akr@fsij.org>
* proc.c (proc_to_s): show is_lambda.
Thu Jun 21 20:36:12 2007 Yukihiro Matsumoto <matz@ruby-lang.org> Thu Jun 21 20:36:12 2007 Yukihiro Matsumoto <matz@ruby-lang.org>
* hash.c (rb_hash_sort): remove hash specific implementation. * hash.c (rb_hash_sort): remove hash specific implementation.

8
proc.c
View file

@ -552,12 +552,14 @@ proc_to_s(VALUE self)
if (iseq->insn_info_tbl) { if (iseq->insn_info_tbl) {
line_no = iseq->insn_info_tbl[0].line_no; line_no = iseq->insn_info_tbl[0].line_no;
} }
str = rb_sprintf("#<%s:%lx@%s:%d>", cname, self, str = rb_sprintf("#<%s:%lx@%s:%d%s>", cname, self,
RSTRING_PTR(iseq->filename), RSTRING_PTR(iseq->filename),
line_no); line_no,
proc->is_lambda ? " (lambda)" : "");
} }
else { else {
str = rb_sprintf("#<%s:%p>", cname, proc->block.iseq); str = rb_sprintf("#<%s:%p%s>", cname, proc->block.iseq,
proc->is_lambda ? " (lambda)" : "");
} }
if (OBJ_TAINTED(self)) { if (OBJ_TAINTED(self)) {