1
0
Fork 0
mirror of https://github.com/ruby/ruby.git synced 2022-11-09 12:17:21 -05:00
ruby--ruby/test/irb
tomoya ishida a09f764ce5 [ruby/irb] Always use local variables in current context to parse code (https://github.com/ruby/irb/pull/397)
* 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 <stan001212@gmail.com>

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

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

Co-authored-by: Stan Lo <stan001212@gmail.com>
Co-authored-by: Takashi Kokubun <takashikkbn@gmail.com>
2022-10-18 05:44:07 +00:00
..
yamatanooroti [ruby/irb] Always use local variables in current context to parse code (https://github.com/ruby/irb/pull/397) 2022-10-18 05:44:07 +00:00
test_cmd.rb [ruby/irb] Remove unnecessary space in regexp 2021-12-20 16:19:37 +09:00
test_color.rb [ruby/irb] Always use local variables in current context to parse code (https://github.com/ruby/irb/pull/397) 2022-10-18 05:44:07 +00:00
test_color_printer.rb [ruby/irb] Use pend instead of skip 2021-08-30 12:39:23 +09:00
test_completion.rb [ruby/irb] Sort constant completion's candidates 2022-10-08 03:17:42 +09:00
test_context.rb [ruby/irb] Always use local variables in current context to parse code (https://github.com/ruby/irb/pull/397) 2022-10-18 05:44:07 +00:00
test_history.rb backup IRBRC environmental variable. It's used by test methods when it's defined. 2022-09-21 14:25:42 +09:00
test_init.rb [ruby/irb] Support --noscript option to not use first non-option argument as script 2022-09-17 02:25:26 +09:00
test_option.rb
test_raise_no_backtrace_exception.rb [ruby/irb] Use pend instead of skip 2021-08-30 12:39:23 +09:00
test_ruby_lex.rb [ruby/irb] Always use local variables in current context to parse code (https://github.com/ruby/irb/pull/397) 2022-10-18 05:44:07 +00:00
test_workspace.rb [ruby/irb] Tests may not execute in the source directory 2021-09-10 08:34:51 +09:00