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

Texas quotes do The Wrong Thing when interpolating vars with strings with spaces in them in Rakudo #994

Closed
p6rt opened this issue May 14, 2009 · 7 comments

Comments

@p6rt
Copy link

p6rt commented May 14, 2009

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

Searchable as RT65654$

@p6rt
Copy link
Author

p6rt commented May 14, 2009

From @masak

<pmichaud> rakudo​: my $foo = 'hello world'; say «$foo».elems
<p6eval> rakudo 705cb2​: OUTPUT«1␤»
<pmichaud> oops.
<pmichaud> oh well :-)
<moritz_> it's not yet christmas ;-)
* masak submits rakudobug

Expected value from the evaluation​: 2, because "hello" and "world"
should end up as different elements.

@p6rt
Copy link
Author

p6rt commented Oct 27, 2009

From @kyleha

This is an automatically generated mail to inform you that tests are now available in t/spec/S02-literals/quoting.t

commit 1f9c51eaf789f73e030942af2e90c0252f7dabcc
Author​: kyle <kyle@​c213334d-75ef-0310-aa23-eaa082d1ae64>
Date​: Tue Oct 27 02​:35​:08 2009 +0000

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

Inline Patch
diff --git a/t/spec/S02-literals/quoting.t b/t/spec/S02-literals/quoting.t
index 1f14139..dfad284 100644
--- a/t/spec/S02-literals/quoting.t
+++ b/t/spec/S02-literals/quoting.t
@@ -1,8 +1,6 @@
 use v6;
-
 use Test;
-
-plan 140;
+plan *;
 
 my $foo = "FOO";
 my $bar = "BAR";
@@ -251,6 +249,13 @@ Note that non-ASCII tests are kept in quoting-unicode.t
     is(~@q4, 'FOO gorch BAR', ", and long form");
 };
 
+#?rakudo todo 'RT 65654'
+{
+    my $rt65654 = 'two words';
+    is «a $rt65654 z».elems,   4, 'interpolate variable with spaces (French)';
+    is <<a $rt65654 z>>.elems, 4, 'interpolate variable with spaces (Texas)';
+}
+
 #?rakudo skip '«...»'
 {
     #L<S02/Literals/"relationship" "single quotes" "double angles">
@@ -531,4 +536,6 @@ Hello, World
     is 'a\\b\''.chars, 4, 'backslash and single quote';
 }
 
+done_testing;
+
 # vim: ft=perl6

@p6rt
Copy link
Author

p6rt commented Oct 27, 2009

The RT System itself - Status changed from 'new' to 'open'

@p6rt
Copy link
Author

p6rt commented Jan 31, 2011

From @coke

On Thu May 14 07​:48​:19 2009, masak wrote​:

<pmichaud> rakudo​: my $foo = 'hello world'; say «$foo».elems
<p6eval> rakudo 705cb2​: OUTPUT«1␤»
<pmichaud> oops.
<pmichaud> oh well :-)
<moritz_> it's not yet christmas ;-)
* masak submits rakudobug

Expected value from the evaluation​: 2, because "hello" and "world"
should end up as different elements.

Misbehavior has changed​:

01​:11 <[Coke]> rakudo​: my $foo = 'hello world'; say «$foo».elems
01​:11 <p6eval> rakudo 549d2a​: OUTPUT«===SORRY!===␤Can't form :w list from
  non-constant strings (yet) at line 22, near ".elems"␤»

--
Will "Coke" Coleda

@p6rt
Copy link
Author

p6rt commented May 28, 2012

From @coke

On Sun Jan 30 22​:14​:47 2011, coke wrote​:

On Thu May 14 07​:48​:19 2009, masak wrote​:

<pmichaud> rakudo​: my $foo = 'hello world'; say «$foo».elems
<p6eval> rakudo 705cb2​: OUTPUT«1␤»
<pmichaud> oops.
<pmichaud> oh well :-)
<moritz_> it's not yet christmas ;-)
* masak submits rakudobug

Expected value from the evaluation​: 2, because "hello" and "world"
should end up as different elements.

Misbehavior has changed​:

01​:11 <[Coke]> rakudo​: my $foo = 'hello world'; say «$foo».elems
01​:11 <p6eval> rakudo 549d2a​: OUTPUT«===SORRY!===␤Can't form :w list from
non-constant strings (yet) at line 22, near ".elems"␤»

Behavior's the same, but the error changed​:

my $foo = 'hello world'; say «$foo».elems
:w list value must be known at compile time

--
Will "Coke" Coleda

@p6rt
Copy link
Author

p6rt commented Nov 14, 2012

From @coke

On Sun May 27 20​:29​:15 2012, coke wrote​:

On Sun Jan 30 22​:14​:47 2011, coke wrote​:

On Thu May 14 07​:48​:19 2009, masak wrote​:

<pmichaud> rakudo​: my $foo = 'hello world'; say «$foo».elems
<p6eval> rakudo 705cb2​: OUTPUT«1␤»
<pmichaud> oops.
<pmichaud> oh well :-)
<moritz_> it's not yet christmas ;-)
* masak submits rakudobug

Expected value from the evaluation​: 2, because "hello" and "world"
should end up as different elements.

Misbehavior has changed​:

01​:11 <[Coke]> rakudo​: my $foo = 'hello world'; say «$foo».elems
01​:11 <p6eval> rakudo 549d2a​: OUTPUT«===SORRY!===␤Can't form :w list from
non-constant strings (yet) at line 22, near ".elems"␤»

Behavior's the same, but the error changed​:

my $foo = 'hello world'; say «$foo».elems
:w list value must be known at compile time

This is now working, and the test was already un-TODO'd.

--
Will "Coke" Coleda

@p6rt
Copy link
Author

p6rt commented Nov 14, 2012

@coke - Status changed from 'open' to 'resolved'

@p6rt p6rt closed this as completed Nov 14, 2012
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