Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Null PMC access when calling rules that do not exist from regexes in Rakudo #886

Closed
p6rt opened this issue Apr 12, 2009 · 4 comments
Closed

Comments

@p6rt
Copy link

p6rt commented Apr 12, 2009

Migrated from rt.perl.org#64668 (status was 'resolved')

Searchable as RT64668$

@p6rt
Copy link
Author

p6rt commented Apr 12, 2009

From @masak

<masak> rakudo​: say 42 ~~ /<number>/
<p6eval> rakudo 5b679a​: OUTPUT«Unable to find regex 'number'␤Null PMC
access in invoke() [...]
* masak submits rakudobug

@p6rt
Copy link
Author

p6rt commented Jul 26, 2009

From @kyleha

I've put a test for this in S05-metasyntax/regex.t, and the code in the
ticket works. I'm marking this resolved.

@p6rt
Copy link
Author

p6rt commented Jul 26, 2009

@kyleha - Status changed from 'new' to 'resolved'

@p6rt p6rt closed this as completed Jul 26, 2009
@p6rt
Copy link
Author

p6rt commented Jul 26, 2009

From @kyleha

This is an automatically generated mail to inform you that tests are now available in t/spec/S05-metasyntax/regex.t

commit 2d64d4da752a97a12ba88928d0f93582d005b32f
Author​: kyle <kyle@​c213334d-75ef-0310-aa23-eaa082d1ae64>
Date​: Sun Jul 26 15​:50​:21 2009 +0000

  [t/spec] Test for RT #​64668
 
  git-svn-id​: http://svn.pugscode.org/pugs@&#8203;27746 c213334d-75ef-0310-aa23-eaa082d1ae64

Inline Patch
diff --git a/t/spec/S05-metasyntax/regex.t b/t/spec/S05-metasyntax/regex.t
index 8004258..d332d75 100644
--- a/t/spec/S05-metasyntax/regex.t
+++ b/t/spec/S05-metasyntax/regex.t
@@ -1,7 +1,7 @@
 use v6;
 use Test;
 
-plan 24;
+plan 26;
 
 # L<S05/Regexes are now first-class language, not strings>
 
@@ -87,3 +87,10 @@ eval_dies_ok 'rx/;/',       'bare ";" is rx is not allowed';
 eval_dies_ok q{';' ~~ /;/}, 'bare ";" in match is not allowed';
 isa_ok rx/\;/, Regex,       'escaped ";" in rx// works';
 ok ';' ~~ /\;/,             'escaped ";" in m// works';
+
+# RT #64668
+{
+    eval '"RT #64668" ~~ /<nosuchrule>/';
+    ok  $!  ~~ Exception, 'use of missing named rule dies';
+    ok "$!" ~~ /nosuchrule/, 'error message mentions the missing rule';
+}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant