mirror of
				https://github.com/janet-lang/janet
				synced 2025-10-31 07:33:01 +00:00 
			
		
		
		
	Fix #638 - update fiber status in certain cases.
This fixes a regression from changes to janet_try. In some cases, we would not update the status of a fiber when signaling, which left the fiber's status as whatever it had previously. This could lead to strange control flow issues.
This commit is contained in:
		| @@ -146,4 +146,18 @@ | ||||
| # os/execute with environment variables | ||||
| (assert (= 0 (os/execute [(dyn :executable) "-e" "(+ 1 2 3)"] :pe {"HELLO" "WORLD"})) "os/execute with env") | ||||
|  | ||||
| # Regression #638 | ||||
| (assert | ||||
|   (= [true :caught] | ||||
|      (protect | ||||
|        (try | ||||
|          (do | ||||
|            (ev/sleep 0) | ||||
|            (with-dyns [] | ||||
|              (ev/sleep 0) | ||||
|              (error "oops"))) | ||||
|          ([err] :caught)))) | ||||
|   "regression #638") | ||||
|  | ||||
|  | ||||
| (end-suite) | ||||
|   | ||||
		Reference in New Issue
	
	Block a user
	 Calvin Rose
					Calvin Rose