<feed xmlns='http://www.w3.org/2005/Atom'>
<title>ruby.git/test/irb/test_ruby_lex.rb, branch v3_2_11</title>
<subtitle>The Ruby Programming Language</subtitle>
<link rel='alternate' type='text/html' href='https://git.ruby-lang.org/ruby.git/'/>
<entry>
<title>Drop Ruby 2.5 support</title>
<updated>2022-11-17T04:06:32+00:00</updated>
<author>
<name>st0012</name>
<email>stan001212@gmail.com</email>
</author>
<published>2022-07-25T22:35:25+00:00</published>
<link rel='alternate' type='text/html' href='https://git.ruby-lang.org/ruby.git/commit/?id=923c1aaed7a5707d5c358627aad37f29e7738143'/>
<id>923c1aaed7a5707d5c358627aad37f29e7738143</id>
<content type='text'>
Because it has reached EOL for more than 1.5 years and it won't be
supported by the next reline version either.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Because it has reached EOL for more than 1.5 years and it won't be
supported by the next reline version either.
</pre>
</div>
</content>
</entry>
<entry>
<title>[ruby/irb] Silent the noise created when building Context in tests</title>
<updated>2022-11-04T18:29:54+00:00</updated>
<author>
<name>Stan Lo</name>
<email>stan.lo@shopify.com</email>
</author>
<published>2022-11-04T17:53:10+00:00</published>
<link rel='alternate' type='text/html' href='https://git.ruby-lang.org/ruby.git/commit/?id=367c072ac6910e487a7619f61baebe1b4a6cf315'/>
<id>367c072ac6910e487a7619f61baebe1b4a6cf315</id>
<content type='text'>
https://github.com/ruby/irb/commit/27e4274b3c
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
https://github.com/ruby/irb/commit/27e4274b3c
</pre>
</div>
</content>
</entry>
<entry>
<title>[ruby/irb] Provide a base test class and let tests restore encodings</title>
<updated>2022-11-03T22:13:11+00:00</updated>
<author>
<name>Stan Lo</name>
<email>stan.lo@shopify.com</email>
</author>
<published>2022-11-03T22:13:07+00:00</published>
<link rel='alternate' type='text/html' href='https://git.ruby-lang.org/ruby.git/commit/?id=a9232038119f2401e6c3d3a4946114b1e878afb5'/>
<id>a9232038119f2401e6c3d3a4946114b1e878afb5</id>
<content type='text'>
conveniently
(https://github.com/ruby/irb/pull/429)

* Create a base TestIRB::TestCase class

* Save/restore encodings for tests that initializes InputMethod classes

Because `RelineInputMethod#initializes` calls `set_encoding`, which
changes stdio/out/err and Encoding's default encoding values, we need to
make sure any test that directly or indirectly (e.g. through Context)
initializes `RelineInputMethod` restores encodings.

`ReadlineInputMethod` also changes encodings but currently no tests
cover it.

* Remove unnecessary TestHelper module

Since we now have a base TestCase, without_rdoc can just live there.

https://github.com/ruby/irb/commit/c2874ec121
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
conveniently
(https://github.com/ruby/irb/pull/429)

* Create a base TestIRB::TestCase class

* Save/restore encodings for tests that initializes InputMethod classes

Because `RelineInputMethod#initializes` calls `set_encoding`, which
changes stdio/out/err and Encoding's default encoding values, we need to
make sure any test that directly or indirectly (e.g. through Context)
initializes `RelineInputMethod` restores encodings.

`ReadlineInputMethod` also changes encodings but currently no tests
cover it.

* Remove unnecessary TestHelper module

Since we now have a base TestCase, without_rdoc can just live there.

https://github.com/ruby/irb/commit/c2874ec121
</pre>
</div>
</content>
</entry>
<entry>
<title>[ruby/irb] Require rubygems to run the test alone on ruby/ruby</title>
<updated>2022-11-03T17:42:45+00:00</updated>
<author>
<name>Takashi Kokubun</name>
<email>takashikkbn@gmail.com</email>
</author>
<published>2022-11-03T17:41:57+00:00</published>
<link rel='alternate' type='text/html' href='https://git.ruby-lang.org/ruby.git/commit/?id=56884b64deeeffb6400060523f8b85211ec99d78'/>
<id>56884b64deeeffb6400060523f8b85211ec99d78</id>
<content type='text'>
`Gem` is not undefined on test-all

https://github.com/ruby/irb/commit/08ac803d61
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
`Gem` is not undefined on test-all

https://github.com/ruby/irb/commit/08ac803d61
</pre>
</div>
</content>
</entry>
<entry>
<title>[ruby/irb] Fix build_context for ruby/ruby CI</title>
<updated>2022-11-03T17:35:15+00:00</updated>
<author>
<name>Takashi Kokubun</name>
<email>takashikkbn@gmail.com</email>
</author>
<published>2022-11-03T17:34:46+00:00</published>
<link rel='alternate' type='text/html' href='https://git.ruby-lang.org/ruby.git/commit/?id=611b5e7f40dd7f0ee00df7981dc60890eeb2f315'/>
<id>611b5e7f40dd7f0ee00df7981dc60890eeb2f315</id>
<content type='text'>
Co-Authored-By: Stan Lo &lt;stan.lo@shopify.com&gt;

https://github.com/ruby/irb/commit/d1fe234a9a
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Co-Authored-By: Stan Lo &lt;stan.lo@shopify.com&gt;

https://github.com/ruby/irb/commit/d1fe234a9a
</pre>
</div>
</content>
</entry>
<entry>
<title>[ruby/irb] Require the entire irb lib in RubyLex test</title>
<updated>2022-11-03T17:12:35+00:00</updated>
<author>
<name>Stan Lo</name>
<email>stan.lo@shopify.com</email>
</author>
<published>2022-11-03T17:12:31+00:00</published>
<link rel='alternate' type='text/html' href='https://git.ruby-lang.org/ruby.git/commit/?id=00f559641a0b4941e0022c67657469dc565ce44d'/>
<id>00f559641a0b4941e0022c67657469dc565ce44d</id>
<content type='text'>
(https://github.com/ruby/irb/pull/428)

RubyLex is not designed to be used alone. It's usually used with an IRB
context, which requires workspace. So its tests should have access to
those components too.

https://github.com/ruby/irb/commit/608f261da4
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
(https://github.com/ruby/irb/pull/428)

RubyLex is not designed to be used alone. It's usually used with an IRB
context, which requires workspace. So its tests should have access to
those components too.

https://github.com/ruby/irb/commit/608f261da4
</pre>
</div>
</content>
</entry>
<entry>
<title>[ruby/irb] Refactor RubyLex and its tests</title>
<updated>2022-11-03T16:32:22+00:00</updated>
<author>
<name>Stan Lo</name>
<email>stan001212@gmail.com</email>
</author>
<published>2022-11-03T16:32:10+00:00</published>
<link rel='alternate' type='text/html' href='https://git.ruby-lang.org/ruby.git/commit/?id=c5d6a483f5f771aa904ea85dad35a368ddf8047a'/>
<id>c5d6a483f5f771aa904ea85dad35a368ddf8047a</id>
<content type='text'>
(https://github.com/ruby/irb/pull/427)

* Make sure `RubyLex#set_input`'s context is always present in tests

In real-world scenarios, the context should always be non-nil:
https://github.com/ruby/irb/blob/master/lib/irb.rb#L489

So we should make sure our test setup reflects that.

* Make context a required keyword

Since in practice, `set_input`'s context should always be non-nil, its
parameters should reflect that.

And since `RubyLex#check_state` is only called by `#lex` and
`#set_input`, both of which now always require context, we can assume
its context should be non-nil too.

https://github.com/ruby/irb/commit/1aeeb86203
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
(https://github.com/ruby/irb/pull/427)

* Make sure `RubyLex#set_input`'s context is always present in tests

In real-world scenarios, the context should always be non-nil:
https://github.com/ruby/irb/blob/master/lib/irb.rb#L489

So we should make sure our test setup reflects that.

* Make context a required keyword

Since in practice, `set_input`'s context should always be non-nil, its
parameters should reflect that.

And since `RubyLex#check_state` is only called by `#lex` and
`#set_input`, both of which now always require context, we can assume
its context should be non-nil too.

https://github.com/ruby/irb/commit/1aeeb86203
</pre>
</div>
</content>
</entry>
<entry>
<title>[ruby/irb] Always use local variables in current context to parse code (https://github.com/ruby/irb/pull/397)</title>
<updated>2022-10-18T05:44:07+00:00</updated>
<author>
<name>tomoya ishida</name>
<email>tomoyapenguin@gmail.com</email>
</author>
<published>2022-10-18T05:44:04+00:00</published>
<link rel='alternate' type='text/html' href='https://git.ruby-lang.org/ruby.git/commit/?id=a09f764ce52838a363b006ea434287eca431dbae'/>
<id>a09f764ce52838a363b006ea434287eca431dbae</id>
<content type='text'>
* Use local_variables for colorize, code_block_open check, nesting_level and assignment_expression check

* Check if expression is an assignment BEFORE evaluating it. evaluate might define new localvars and change result of assignment_expression?

* Add local_variables dependent code test

* pend local variable dependent test on truffleruby

code_block_open is not working on truffleruby

* Always pass context to RubyLex#lex

* Rename local_variable_assign_code generator method name

* Add assignment expression truncate test

* Add Context#local_variables and make generate_local_variables_assign_code more simple

* Update lib/irb/input-method.rb

Co-authored-by: Stan Lo &lt;stan001212@gmail.com&gt;

* Add a comment why assignment expression check should be done before evaluate

https://github.com/ruby/irb/commit/c8b3877281

Co-authored-by: Stan Lo &lt;stan001212@gmail.com&gt;
Co-authored-by: Takashi Kokubun &lt;takashikkbn@gmail.com&gt;</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
* Use local_variables for colorize, code_block_open check, nesting_level and assignment_expression check

* Check if expression is an assignment BEFORE evaluating it. evaluate might define new localvars and change result of assignment_expression?

* Add local_variables dependent code test

* pend local variable dependent test on truffleruby

code_block_open is not working on truffleruby

* Always pass context to RubyLex#lex

* Rename local_variable_assign_code generator method name

* Add assignment expression truncate test

* Add Context#local_variables and make generate_local_variables_assign_code more simple

* Update lib/irb/input-method.rb

Co-authored-by: Stan Lo &lt;stan001212@gmail.com&gt;

* Add a comment why assignment expression check should be done before evaluate

https://github.com/ruby/irb/commit/c8b3877281

Co-authored-by: Stan Lo &lt;stan001212@gmail.com&gt;
Co-authored-by: Takashi Kokubun &lt;takashikkbn@gmail.com&gt;</pre>
</div>
</content>
</entry>
<entry>
<title>[ruby/irb] Fix code terminated check with heredoc and backtick (https://github.com/ruby/irb/pull/390)</title>
<updated>2022-10-18T05:30:33+00:00</updated>
<author>
<name>tomoya ishida</name>
<email>tomoyapenguin@gmail.com</email>
</author>
<published>2022-10-18T05:30:29+00:00</published>
<link rel='alternate' type='text/html' href='https://git.ruby-lang.org/ruby.git/commit/?id=344e6c915f41d99df024c7e90403baca0d5213a5'/>
<id>344e6c915f41d99df024c7e90403baca0d5213a5</id>
<content type='text'>
* Fix backtick method def method call handled as backtick open

* Fix handling heredoc in check_string_literal

* Sort result of lexer.parse by pos in ruby&lt;2.7. It's not sorted when the given code includes heredoc.

* Update lib/irb/ruby-lex.rb

Co-authored-by: Stan Lo &lt;stan001212@gmail.com&gt;

* Update lib/irb/ruby-lex.rb

Co-authored-by: Stan Lo &lt;stan001212@gmail.com&gt;

* Add check_string_literal test for heredoc code that does not end with newline

https://github.com/ruby/irb/commit/44bc712460

Co-authored-by: Stan Lo &lt;stan001212@gmail.com&gt;</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
* Fix backtick method def method call handled as backtick open

* Fix handling heredoc in check_string_literal

* Sort result of lexer.parse by pos in ruby&lt;2.7. It's not sorted when the given code includes heredoc.

* Update lib/irb/ruby-lex.rb

Co-authored-by: Stan Lo &lt;stan001212@gmail.com&gt;

* Update lib/irb/ruby-lex.rb

Co-authored-by: Stan Lo &lt;stan001212@gmail.com&gt;

* Add check_string_literal test for heredoc code that does not end with newline

https://github.com/ruby/irb/commit/44bc712460

Co-authored-by: Stan Lo &lt;stan001212@gmail.com&gt;</pre>
</div>
</content>
</entry>
<entry>
<title>[ruby/irb] Fix ripper_lex_without_warning duplicated heredoc token</title>
<updated>2022-09-30T19:17:15+00:00</updated>
<author>
<name>tompng</name>
<email>tomoyapenguin@gmail.com</email>
</author>
<published>2022-09-27T04:14:42+00:00</published>
<link rel='alternate' type='text/html' href='https://git.ruby-lang.org/ruby.git/commit/?id=641310ce371bd220a5ddd5e54a86979f4055608b'/>
<id>641310ce371bd220a5ddd5e54a86979f4055608b</id>
<content type='text'>
https://github.com/ruby/irb/commit/45b539af39
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
https://github.com/ruby/irb/commit/45b539af39
</pre>
</div>
</content>
</entry>
</feed>
