Permalink
Browse files

Make "".ord return Any, just like Niecza (unspecced behaviour, afaics)

  • Loading branch information...
1 parent 5aeaca0 commit bb2d2e2108926632db9a7c1c5e9401ba27bfb9af @lizmat lizmat committed Sep 2, 2013
Showing with 4 additions and 1 deletion.
  1. +4 −1 src/core/Cool.pm
View
5 src/core/Cool.pm
@@ -116,7 +116,10 @@ my class Cool { # declared in BOOTSTRAP
}
method ord() {
- nqp::p6box_i(nqp::ord(nqp::unbox_s(self.Str)))
+ my $s := self.Str;
+ $s.chars
+ ?? nqp::p6box_i(nqp::ord(nqp::unbox_s($s)))
+ !! Any;
}
method chr() {
self.Int.chr;

0 comments on commit bb2d2e2

Please sign in to comment.