Skip to content

fix: require "English" for $OUTPUT_RECORD_SEPARATOR#255

Open
yykamei wants to merge 1 commit into
googleapis:mainfrom
yykamei:global-variable
Open

fix: require "English" for $OUTPUT_RECORD_SEPARATOR#255
yykamei wants to merge 1 commit into
googleapis:mainfrom
yykamei:global-variable

Conversation

@yykamei
Copy link
Copy Markdown

@yykamei yykamei commented May 22, 2025

$OUTPUT_RECORD_SEPARATOR is defined as the alias of $\ in English gem. Without this gem, the variable is not defined, and Ruby warns with the message below.

warning: global variable '$OUTPUT_RECORD_SEPARATOR' not initialized

By the way, I'm not confident the code really requires the global variable, but I kept the behavior as it is.

token = /[-!#{$OUTPUT_RECORD_SEPARATOR}%&'*+.^_`|~0-9a-zA-Z]+/

`$OUTPUT_RECORD_SEPARATOR` is defined as the alias of `$\` in `English` gem.
Without this gem, the variable is not defined, and Ruby warns with the
message below.

```
warning: global variable '$OUTPUT_RECORD_SEPARATOR' not initialized
```

By the way, I'm not confident the code really requires the global
variable, but I kept the behavior as it is.

```ruby
token = /[-!#{$OUTPUT_RECORD_SEPARATOR}%&'*+.^_`|~0-9a-zA-Z]+/
```
@yykamei yykamei requested a review from a team May 22, 2025 14:25
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

Successfully merging this pull request may close these issues.

1 participant