-
Notifications
You must be signed in to change notification settings - Fork 25
Permalink
Choose a base ref
{{ refName }}
default
Choose a head ref
{{ refName }}
default
Comparing changes
Choose two branches to see what’s changed or to start a new pull request.
If you need to, you can also or
learn more about diff comparisons.
Open a pull request
Create a new pull request by comparing changes across two branches. If you need to, you can also .
Learn more about diff comparisons here.
base repository: ruby/timeout
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: v0.3.2
Could not load branches
Nothing to show
Loading
Could not load tags
Nothing to show
{{ refName }}
default
Loading
...
head repository: ruby/timeout
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: v0.4.0
Could not load branches
Nothing to show
Loading
Could not load tags
Nothing to show
{{ refName }}
default
Loading
- 7 commits
- 9 files changed
- 3 contributors
Commits on Mar 24, 2023
-
Configuration menu - View commit details
-
Copy full SHA for 1e31a9a - Browse repository at this point
Copy the full SHA 1e31a9aView commit details -
Merge pull request #29 from ruby/update-test-lib-20230324
Update test libraries from ruby/ruby 2023-03-24
Configuration menu - View commit details
-
Copy full SHA for b0ec156 - Browse repository at this point
Copy the full SHA b0ec156View commit details
Commits on Jun 13, 2023
-
Configuration menu - View commit details
-
Copy full SHA for 1c91ac2 - Browse repository at this point
Copy the full SHA 1c91ac2View commit details -
Merge pull request #31 from nobu/test-unit-ruby-core
Use released version of test-unit-ruby-core
Configuration menu - View commit details
-
Copy full SHA for 20629a6 - Browse repository at this point
Copy the full SHA 20629a6View commit details
Commits on Jun 19, 2023
-
Move gemspec files to top of lib directory.
They have version.rb files with same directory. But version.rb have been removed at ruby/ruby#3375 There is no reason to locate under the library name of directory.
Configuration menu - View commit details
-
Copy full SHA for cae26ed - Browse repository at this point
Copy the full SHA cae26edView commit details
Commits on Jun 22, 2023
-
Raise exception instead of throw/catch for timeouts (#30)
throw/catch is used for non-local control flow, not for exceptional situations. For exceptional situations, raise should be used instead. A timeout is an exceptional situation, so it should use raise, not throw/catch. Timeout's implementation that uses throw/catch internally causes serious problems. Consider the following code: ```ruby def handle_exceptions yield rescue Exception => exc handle_error # e.g. ROLLBACK for databases raise ensure handle_exit unless exc # e.g. COMMIT for databases end Timeout.timeout(1) do handle_exceptions do do_something end end ``` This kind of design ensures that all exceptions are handled as errors, and ensures that all exits (normal exit, early return, throw/catch) are not handled as errors. With Timeout's throw/catch implementation, this type of code does not work, since a timeout triggers the normal exit path. See rails/rails#29333 for an example of the damage Timeout's design has caused the Rails ecosystem. This switches Timeout.timeout to use raise/rescue internally. It adds a Timeout::ExitException subclass of exception for the internal raise/rescue, which Timeout.timeout will convert to Timeout::Error for backwards compatibility. Timeout::Error remains a subclass of RuntimeError. This is how timeout used to work in Ruby 2.0. It was changed in Ruby 2.1, after discussion in [Bug #8730] (commit 238c003 in the timeout repository). I think the change from using raise/rescue to using throw/catch has caused significant harm to the Ruby ecosystem at large, and reverting it is the most sensible choice. From the translation of [Bug #8730], it appears the issue was that someone could rescue Exception and not reraise the exception, causing timeout errors to be swallowed. However, such code is broken anyway. Using throw/catch causes far worse problems, because then it becomes impossible to differentiate between normal control flow and exceptional control flow. Also related to this is [Bug #11344], which changed how Thread.handle_interrupt interacted with Timeout. Co-authored-by: Nobuyoshi Nakada <[email protected]>
Configuration menu - View commit details
-
Copy full SHA for f16545a - Browse repository at this point
Copy the full SHA f16545aView commit details
Commits on Jun 23, 2023
-
Configuration menu - View commit details
-
Copy full SHA for 413194f - Browse repository at this point
Copy the full SHA 413194fView commit details
Loading
This comparison is taking too long to generate.
Unfortunately it looks like we can’t render this comparison for you right now. It might be too big, or there might be something weird with your repository.
You can try running this command locally to see the comparison on your machine:
git diff v0.3.2...v0.4.0