diff options
author | Kevin Newton <kddnewton@gmail.com> | 2023-11-02 15:06:50 -0400 |
---|---|---|
committer | Kevin Newton <kddnewton@gmail.com> | 2023-11-03 10:13:50 -0400 |
commit | d7d3243364ba39bfb5dddb10d5d6c8733b4ceb37 (patch) | |
tree | 9213b34638d1cef0b4a4798cb36306f876642411 /test/prism/ruby_api_test.rb | |
parent | 95d3f2eaec1456eb5a964c4622ccc723af020ef2 (diff) | |
download | ruby-d7d3243364ba39bfb5dddb10d5d6c8733b4ceb37.tar.gz |
[ruby/prism] Properly support the start line option
https://github.com/ruby/prism/commit/33cc75a4b7
Diffstat (limited to 'test/prism/ruby_api_test.rb')
-rw-r--r-- | test/prism/ruby_api_test.rb | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/test/prism/ruby_api_test.rb b/test/prism/ruby_api_test.rb index 844a7796a3..a61282cca1 100644 --- a/test/prism/ruby_api_test.rb +++ b/test/prism/ruby_api_test.rb @@ -24,6 +24,9 @@ module Prism assert_equal "", Prism.parse("__FILE__").value.statements.body[0].filepath assert_equal "foo.rb", Prism.parse("__FILE__", filepath: "foo.rb").value.statements.body[0].filepath + assert_equal 1, Prism.parse("foo").value.statements.body[0].location.start_line + assert_equal 10, Prism.parse("foo", line: 10).value.statements.body[0].location.start_line + refute Prism.parse("\"foo\"").value.statements.body[0].frozen? assert Prism.parse("\"foo\"", frozen_string_literal: true).value.statements.body[0].frozen? refute Prism.parse("\"foo\"", frozen_string_literal: false).value.statements.body[0].frozen? |