<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta http-equiv="Content-Type" content="text/xhtml; charset=utf-8">
</head>
<body>
<div style="font-family:sans-serif"><div style="white-space:normal">
<p dir="auto">On 3 Mar 2017, at 3:48, Alex Chan wrote:</p>

<p dir="auto"></p></div>
<div style="white-space:normal"><blockquote style="border-left:2px solid #777; color:#777; margin:0 0 5px; padding-left:5px"><p dir="auto">I’ve hit a bug when using “Comment Line” in Terraform documents,<br>
although it only occurs on certain lines.<br>
[…]<br>
a) Comment Line:140:in `<main>': undefined method `to_a' for<br>
"\u0000variable \"aws_region\" {":String (NoMethodError)</p>
</blockquote></div>
<div style="white-space:normal">

<p dir="auto">It seems that your <em>Comment Line</em> action is being executed by ruby 2.0, however, the shebang of this command is: <code style="background-color:#F7F7F7; border-radius:3px; margin:0; padding:0 0.4em" bgcolor="#F7F7F7">#!/usr/bin/env ruby18</code>.</p>

<p dir="auto">I think it fails only for some lines because <code style="background-color:#F7F7F7; border-radius:3px; margin:0; padding:0 0.4em" bgcolor="#F7F7F7">to_a</code> is only used for certain code paths.</p>

<p dir="auto">Can you double-check that you are using the stock/unmodified <em>Comment Line</em> action?</p>

<p dir="auto">One way to do this would be to use ⌃⌘T then switch to Key Equivalent search and press ⌘/ — now hit “Edit” and check you get the command in the Source bundle, and that it has the <code style="background-color:#F7F7F7; border-radius:3px; margin:0; padding:0 0.4em" bgcolor="#F7F7F7">ruby18</code> shebang.</p>

<p dir="auto">Kind regards Allan</p>
</div>
</div>
</body>
</html>