-
-
Notifications
You must be signed in to change notification settings - Fork 925
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
squiggly heredoc with single quotes indent wrong #4260
Comments
What file is this issue in? Does someone have a link to that file so I can see the code that does this? |
@andyn95 It RubyLexer.java and LexingCommon.java. The method to look at is heredoc_dedent. Comparison vs C Ruby source may be helpful. |
The issue is reproduced in JRuby 9.2.7. % ruby -v
jruby 9.2.7.0 (2.5.3) 2019-04-09 8a269e3 Java HotSpot(TM) 64-Bit Server VM 25.5-b02 on 1.8.0_05-b13 +jit [darwin-x86_64] I found it when I was working on RuboCop to drop supporting Ruby 2.2. |
@koic I will fix this for 9.2.8.0. I looked briefly and heredoc_indent value is some weird astronomically large value so something is not getting reset or something. |
Thank you very much. I'm looking forward to the release of JRuby 9.2.8.0. |
jruby/jruby#4260 has been resolved and JRuby 9.2.8.0 is available on CircleCI. https://hub.docker.com/r/circleci/jruby/tags ```console % docker run --rm -it circleci/jruby:9.2 Unable to find image 'circleci/jruby:9.2' locally 9.2: Pulling from circleci/jruby 9cc2ad81d40d: Pull complete e6cb98e32a52: Pull complete ae1b8d879bad: Pull complete 2383fa4462e7: Pull complete 7ac3ce9f2067: Pull complete ce9a16d8ddcb: Pull complete b250e79d9c7f: Pull complete ce3b7f0ecca6: Pull complete 2405779516de: Pull complete 902dc7b355a1: Pull complete 432a6994cb77: Pull complete 66a081bddadb: Pull complete 1576af617cb5: Pull complete 4233b310ce28: Pull complete 51c0ac4a73c0: Pull complete c43fdb6f1fe8: Pull complete 909d5a0f7f69: Pull complete 940e076596c5: Pull complete c6abd11f682b: Pull complete 678a31b2fb39: Pull complete Digest: sha256:ee43918172710e4871054ce450da6e5f6d66cdeb1fe8397d356742bf142f20a2 Status: Downloaded newer image for circleci/jruby:9.2 $ ruby -v jruby 9.2.8.0 (2.5.3) 2019-08-12 a1ac7ff OpenJDK 64-Bit Server VM 25.222-b10 on 1.8.0_222-b10 +jit [linux-x86_64] ``` This PR aims to solve the following issues solved by JRuby. - rubocop#7026 (comment) - rubocop#7173 (comment) - rubocop#7229 (comment) - rubocop#7228 (comment) It also removes unnecessary `strip_indent`.
jruby/jruby#4260 has been resolved and JRuby 9.2.8.0 is available on CircleCI. https://hub.docker.com/r/circleci/jruby/tags ```console % docker run --rm -it circleci/jruby:9.2 Unable to find image 'circleci/jruby:9.2' locally 9.2: Pulling from circleci/jruby 9cc2ad81d40d: Pull complete e6cb98e32a52: Pull complete ae1b8d879bad: Pull complete 2383fa4462e7: Pull complete 7ac3ce9f2067: Pull complete ce9a16d8ddcb: Pull complete b250e79d9c7f: Pull complete ce3b7f0ecca6: Pull complete 2405779516de: Pull complete 902dc7b355a1: Pull complete 432a6994cb77: Pull complete 66a081bddadb: Pull complete 1576af617cb5: Pull complete 4233b310ce28: Pull complete 51c0ac4a73c0: Pull complete c43fdb6f1fe8: Pull complete 909d5a0f7f69: Pull complete 940e076596c5: Pull complete c6abd11f682b: Pull complete 678a31b2fb39: Pull complete Digest: sha256:ee43918172710e4871054ce450da6e5f6d66cdeb1fe8397d356742bf142f20a2 Status: Downloaded newer image for circleci/jruby:9.2 $ ruby -v jruby 9.2.8.0 (2.5.3) 2019-08-12 a1ac7ff OpenJDK 64-Bit Server VM 25.222-b10 on 1.8.0_222-b10 +jit [linux-x86_64] ``` This PR aims to solve the following issues solved by JRuby. - #7026 (comment) - #7173 (comment) - #7229 (comment) - #7228 (comment) It also removes unnecessary `strip_indent`.
Environment
jruby 9.1.5.0 (2.3.1) 2016-09-23 fffffff Java HotSpot(TM) Client VM 25.51-b03 on 1.8.0_51-b16 +jit [mswin32-x86]
Test Code
Expected Behavior
MRI output:
Actual Behavior
jruby output:
The text was updated successfully, but these errors were encountered: