summaryrefslogtreecommitdiff
path: root/lib
AgeCommit message (Collapse)Author
2024-02-13[rubygems/rubygems] Update SPDX license list as of 2024-02-08License Update
https://github.com/rubygems/rubygems/commit/ec3de95d79
2024-02-12[ruby/irb] Powerup show_source by enabling RubyVM.keep_script_linestomoya ishida
(https://github.com/ruby/irb/pull/862) * Powerup show_source by enabling RubyVM.keep_script_lines * Add file_content field to avoid reading file twice while show_source * Change path passed to eval, don't change irb_path. * Encapsulate source coloring logic and binary file check insode class Source * Add edit command testcase when irb_path does not exist * Memoize irb_path existence to reduce file existence check calculating eval_path https://github.com/ruby/irb/commit/239683a937
2024-02-12[ruby/prism] ruby_parser translatorKevin Newton
https://github.com/ruby/prism/commit/1925b970c7
2024-02-12[ruby/prism] Move Prism::RipperCompat to Prism::Translation::RipperNoah Gibbs
https://github.com/ruby/prism/commit/c0331abe4f
2024-02-12[ruby/irb] Fix exit! command warning and method behaviortomoya ishida
(https://github.com/ruby/irb/pull/868) * Fix exit! command warning and method behavior * Remove arg(0) from Kernel.exit and Kernel.exit! https://github.com/ruby/irb/commit/372bc59bf5
2024-02-12Burn default ASAN options into the built RubyKJ Tsanaktsidis
* We always need use_sigaltstack=0 because Ruby registers sigaltstack handlers * We also need to disable leak detection (unless RUBY_FREE_AT_EXIT is set - I might experiment later with automatically enabling leak detection if RUBY_FREE_AT_EXIT is set). Burning it into the built ruby binary in this way avoids people needing to remember to start their Ruby program with these flags all the time. We also need a small fix in mkmf to make sure that test programs also don't have leak detection enabled (this is never desirable) [Bug #20256]
2024-02-11[ruby/optparse] [DOC] Add description of OptionParser#define_by_keywordsNobuyoshi Nakada
https://github.com/ruby/optparse/commit/451dea51a0
2024-02-11[ruby/optparse] [DOC] Add missing documentsNobuyoshi Nakada
https://github.com/ruby/optparse/commit/33956ce93f
2024-02-11[ruby/irb] Polish the exit! command and its testsStan Lo
(https://github.com/ruby/irb/pull/867) * Remove IRB.irb_exit! method It's not necessary to introduce a new method just for the exit! command at this moment. * Rename ExitForcedAction to ForceExit * Move force exit tests to a dedicated file * Fix nested history saving with exit! command Because we switched to use `Kernel#exit` instead of `exit!`, the outer session's ensure block in `Irb#run` will be run, which will save the history. This means the separate check to save history when force exiting is no longer necessary. * execute_lines helper should also capture IRB setup's output This prevents setup warnings from being printed to test output while allowing those output to be tested. * Update readme https://github.com/ruby/irb/commit/899d10ade1
2024-02-10[ruby/irb] Introduce exit! commandIgnacio Chiazzo Cardarello
(https://github.com/ruby/irb/pull/851) * Added failing test for when writing history on exit * Save history on exit * Exit early when calling Kernel.exit * use status 0 for kernel.exit * Added test for nested sessions * Update lib/irb.rb --------- https://github.com/ruby/irb/commit/c0a5f31679 Co-authored-by: Stan Lo <[email protected]>
2024-02-11[ruby/optparse] Search exactly when `require_exact`Nobuyoshi Nakada
To work with options defined as `--[no]-something`. Fix https://bugs.ruby-lang.org/issues/20252 Fix https://github.com/ruby/optparse/pull/60 https://github.com/ruby/optparse/commit/78afdab307
2024-02-09[ruby/prism] Update lib/prism/ripper_compat.rbNoah Gibbs
https://github.com/ruby/prism/commit/2c53e017c1 Co-authored-by: Kevin Newton <[email protected]>
2024-02-09[ruby/prism] RipperCompat: add array-refs, assigns, symbols, stringsNoah Gibbs
https://github.com/ruby/prism/commit/b771c7f2ec
2024-02-09[ruby/prism] Significantly faster offset cache for parserKevin Newton
https://github.com/ruby/prism/commit/8cd92eef79
2024-02-09[ruby/optparse] Adjust arguments for lambda-callbacksNobuyoshi Nakada
Rake uses [lambda] as callbacks. Calling it without omitted argument raises an `ArgumentError`. lambda: https://github.com/ruby/rake/blob/master/lib/rake/application.rb#L543 https://github.com/ruby/optparse/commit/213cb03b59
2024-02-09[ruby/optparse] Respect default values in block parametersNobuyoshi Nakada
Fix https://github.com/ruby/optparse/pull/55 https://github.com/ruby/optparse/commit/9d53e74aa4
2024-02-09[ruby/optparse] Fix `require_exact` to work with options defined as ↵fatkodima
`--[no]-something` https://github.com/ruby/optparse/commit/4e346ad337
2024-02-09[ruby/optparse] Escape backslashesNobuyoshi Nakada
https://github.com/ruby/optparse/commit/b14c2c644d
2024-02-09[ruby/rdoc] Don't document aliases with trailing `:nodoc` directivePetrik
Attribute readers and writers can be marked as `:nodoc` to keep them undocumented: ```ruby attr_reader :name # :nodoc: ``` For aliases this behaviour should be the same: ```ruby alias_method :old :new # :nodoc: ``` https://github.com/ruby/rdoc/commit/30f14e8271
2024-02-08[ruby/prism] Looks like Symbol#name wasn't a thing in 2.7, so need to switch ↵Noah Gibbs
back to to_s https://github.com/ruby/prism/commit/0b90c9a398
2024-02-08[ruby/prism] Add Kevin's visit_all change and change the parent class to ↵Noah Gibbs
Compiler. https://github.com/ruby/prism/commit/bbdba3f42d Co-Authored-By: Kevin Newton <[email protected]>
2024-02-08[ruby/prism] Update lib/prism/ripper_compat.rbNoah Gibbs
https://github.com/ruby/prism/commit/03addf2d3d Co-authored-by: Kevin Newton <[email protected]>
2024-02-08[ruby/prism] Update lib/prism/ripper_compat.rbNoah Gibbs
https://github.com/ruby/prism/commit/5eac08f699 Co-authored-by: Kevin Newton <[email protected]>
2024-02-08[ruby/prism] Update lib/prism/ripper_compat.rbNoah Gibbs
https://github.com/ruby/prism/commit/8271ce5ec9 Co-authored-by: Kevin Newton <[email protected]>
2024-02-08[ruby/prism] Update lib/prism/ripper_compat.rbNoah Gibbs
https://github.com/ruby/prism/commit/6e2bf9c8cd Co-authored-by: Kevin Newton <[email protected]>
2024-02-08[ruby/prism] Update lib/prism/ripper_compat.rbNoah Gibbs
https://github.com/ruby/prism/commit/bce0a5c916 Co-authored-by: Kevin Newton <[email protected]>
2024-02-08[ruby/prism] RipperCompat: support for more features.Noah Gibbs
* add bin/prism ripper to compare Ripper output * block arg handling is quirky, do it per-call-site * block required params * boolean values * various assign-operator support * breaks, early fragile begin/rescue/end * more fixtures being checked https://github.com/ruby/prism/commit/31732cb720
2024-02-08[rubygems/rubygems] rake vendor:installHiroshi SHIBATA
https://github.com/rubygems/rubygems/commit/c38a96ceae
2024-02-08[rubygems/rubygems] Removed unnecessary disabling of Style/RedundantParenthesesHiroshi SHIBATA
https://github.com/rubygems/rubygems/commit/2361527c45
2024-02-08[rubygems/rubygems] Use deprecation helper for deprecation warningDavid Rodriguez
https://github.com/rubygems/rubygems/commit/d1963bf1a6
2024-02-08[rubygems/rubygems] Refactor lockfile generationDavid Rodríguez
https://github.com/rubygems/rubygems/commit/6a0c03c77f
2024-02-08[rubygems/rubygems] Remove unused parameterDavid Rodríguez
https://github.com/rubygems/rubygems/commit/085eda7147
2024-02-07[ruby/prism] Dev-only CLIKevin Newton
We keep adding more scripts to /bin that are doing the same kinds of processing. Instead, this commit consolidates them all into a single CLI that shares the same logic so that we can consistently read files in the same way. It keeps around 2 binstubs for bin/lex and bin/parse since those are the most used and I'm sure people have built up muscle memory for those. Those scripts are now just wrappers for forwarding to bin/prism. https://github.com/ruby/prism/commit/bddcb9bf17
2024-02-07[ruby/prism] Commit Kevin's suggestion to simplify grabbing the operator.Noah Gibbs
https://github.com/ruby/prism/commit/874ba7a1f4 Co-Authored-By: Kevin Newton <[email protected]>
2024-02-07[ruby/prism] More different block-call syntaxes, support more types of ↵Noah Gibbs
method calls https://github.com/ruby/prism/commit/40cf114a24
2024-02-07[ruby/prism] Support &. calls and calling with blocks, test with fixturesNoah Gibbs
https://github.com/ruby/prism/commit/e346fa583a
2024-02-07[ruby/prism] RipperCompat: support more kinds of method calls and operators.Noah Gibbs
Add tests. Start parsing some simpler fixture code. https://github.com/ruby/prism/commit/997f4191d8
2024-02-07Bump prism versionKevin Newton
2024-02-07[ruby/irb] Bump version to v1.11.2Stan Lo
(https://github.com/ruby/irb/pull/865) https://github.com/ruby/irb/commit/afe1f459cc
2024-02-07[ruby/prism] Support for Ruby 2.7Kevin Newton
https://github.com/ruby/prism/commit/1a15b70a8e
2024-02-07[ruby/irb] Polish tracer integration and testsStan Lo
(https://github.com/ruby/irb/pull/864) * Remove useless ivar * Simplify tracer test setup * Treat tracer like a normal development dependency * Only require ext/tracer when value is truthy * Make tracer integration skip IRB traces https://github.com/ruby/irb/commit/a97a4129a7
2024-02-07[ruby/prism] Correct handle recover parameters on tokenize for parser ↵Kevin Newton
translation https://github.com/ruby/prism/commit/63979de21d
2024-02-07[rubygems/rubygems] #to_spec must fallback for prereleases alwaysKim Emmanuel
https://github.com/rubygems/rubygems/commit/6302798a32
2024-02-07[rubygems/rubygems] fix Gem::Dependency#to_spec returning nil when ↵Kim Emmanuel
prerelease is the only available version https://github.com/rubygems/rubygems/commit/a7dcc7214b
2024-02-07[ruby/prism] Even more ripper compatKevin Newton
https://github.com/ruby/prism/commit/47a602dc1c
2024-02-07[ruby/prism] More visitors and tests for RipperCompatNoah Gibbs
Part of issue #2354 https://github.com/ruby/prism/commit/cb28edae34
2024-02-06[ruby/prism] Implement file parsing error handlingeileencodes
This PR implements proper file parsing error handling. Previously `file_options` would call `pm_string_mapped_init` which would print an error from `perror`. However this wouldn't raise a proper Ruby error so it was just a string output. I've done the following: - Raise an error from `rb_syserr_fail` with the filepath in `file_options`. - No longer return `Qnil` if `file_options` returns false (because now it will raise) - Update `file_options` to return `static void` instead of `static bool`. - Update `file_options` and `profile_file` to check the type so when passing `nil` we see a `TypeError`. - Delete `perror` from `pm_string_mapped_init` - Update `FFI` backend to raise appropriate errors when calling `pm_string_mapped_init`. - Add tests for `dump_file`, `lex_file`, `parse_file`, `parse_file_comments`, `parse_lex_file`, and `parse_file_success?` when a file doesn't exist and for `nil`. - Updates the `bin/parse` script to no longer raise it's own `ArgumentError` now that we raise a proper error. Fixes: ruby/prism#2207 https://github.com/ruby/prism/commit/b2f7494ff5
2024-02-06[ruby/irb] Fix usage of tracer gem and add testsNuno Silva
(https://github.com/ruby/irb/pull/857) The new tests are skipped when ruby below 3.1, as it was a default gem on it, and in a version we do not support. This also move definition of `use_tracer` to module Context instead of monkey patch. https://github.com/ruby/irb/commit/08834fbd5f
2024-02-05[rubygems/rubygems] Revert "Simplify how extensions are built"David Rodriguez
This reverts commit https://github.com/rubygems/rubygems/commit/0b8faf1e3926. https://github.com/rubygems/rubygems/commit/7528e0f1ce
2024-02-05Sync to latest prismKevin Newton