Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Make "".ord return Any, just like Niecza (unspecced behaviour, afaics)
  • Loading branch information
lizmat committed Sep 2, 2013
1 parent 5aeaca0 commit bb2d2e2
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/core/Cool.pm
Expand Up @@ -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;
Expand Down

0 comments on commit bb2d2e2

Please sign in to comment.