Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
Show all changes
67 commits
Select commit Hold shift + click to select a range
116ec56
* version.h (RUBY_VERSION): bump RUBY_VERSION to 2.1.7.
unak Apr 14, 2015
976bf35
merge revision(s) 49154,49155,49156,49159: [Backport #10384] [Backpor…
unak Apr 24, 2015
513b313
merge revision(s) 50316: [Backport #11030]
unak Apr 28, 2015
7829c32
merge revision(s) 50141: [Backport #11021]
unak Apr 28, 2015
4a680e8
merge revision(s) 50402: [Backport #11107]
unak May 11, 2015
14c7be2
merge revision(s) 50416: [Backport #11111]
unak May 11, 2015
dd4cf6b
* ext/tk/extconf.rb: support Tcl/Tk8.6.
unak May 12, 2015
0cddf1b
merge revision(s) 49095: [Backport #11144]
unak May 13, 2015
79881c9
merge revision(s) 50541,50542: [Backport #11159]
unak May 20, 2015
f1cb00f
merge revision(s) 49776: [Backport #9144]
unak May 21, 2015
bf8a18a
merge revision(s) 49792: [Backport #10918]
unak May 21, 2015
53ce4da
merge revision(s) 50185: [Backport #10952]
unak May 21, 2015
e358e2f
merge revision(s) 50187,50202: [Backport #11051]
unak May 21, 2015
39a6566
merge revision(s) 50206: [Backport #10724]
unak May 21, 2015
bdf81a6
merge revision(s) 50305: [Backport #11065]
unak May 21, 2015
ad70c73
merge revision(s) 50404,50405: [Backport #10975]
unak May 21, 2015
137514a
merge revision(s) 50406,50407: [Backport #11075]
unak May 21, 2015
7a03d46
merge revision(s) 50421: [Backport #11113]
unak May 21, 2015
a2126a6
merge revision(s) 50509: [Backport #11132]
unak May 21, 2015
7944b62
merge revision(s) 50444: [Backport #11128]
unak May 21, 2015
3a31231
merge revision(s) 50449: [Backport #11123]
unak May 21, 2015
ed737b8
merge revision(s) 49999,50000: [Backport #10979]
unak May 28, 2015
847b7bc
* marshal.c (r_symreal): register the symbol name first so that
unak May 29, 2015
e8dc702
Partially merge revision 49195: [Bug #10717]
unak May 29, 2015
6f97605
merge revision(s) 49618,49640: [Backport #10858]
unak May 29, 2015
0d1f4fb
merge revision(s) 49491: [Backport #10823]
unak May 29, 2015
4def227
merge revision(s) 50515: [Backport #11155]
unak Jun 9, 2015
16b551f
merge revision(s) 50637: [Backport #11172]
unak Jun 9, 2015
7d7ed2c
merge revision(s) 50646: [Backport #11185]
unak Jun 9, 2015
f201642
merge revision(s) 50685: [Backport #11198]
unak Jun 9, 2015
9af0f53
merge revision(s) 49898: [Backport #10951]
unak Jun 17, 2015
61f3bae
merge revision(s) 50982,50983: [Backport #11291]
unak Jun 29, 2015
ee15197
merge revision(s) 49224,49225,49234,49235: [Backport #10711]
unak Jun 30, 2015
dffe87c
merge revision(s) 50887,50896,50902: [Backport #11060]
unak Jul 3, 2015
1bd36e3
merge revision(s) 50430,50440: [Backport #11117]
unak Jul 3, 2015
a57c925
merge revision(s) 50793,51120: [Backport #11162]
unak Jul 3, 2015
bf57198
merge revision(s) 50671: [Backport #11192]
unak Jul 3, 2015
f81db3c
merge revision(s) 50717: [Backport #11201]
unak Jul 3, 2015
759d128
merge revision(s) 49235: [Backport #10711]
unak Jul 3, 2015
b0ed276
* test/ruby/test_require.rb (TestRequire#test_loading_fifo_threading):
unak Jul 3, 2015
6282b15
* test/ruby/test_require.rb (TestRequire#test_loading_fifo_threading):
unak Jul 3, 2015
e25bb03
merge revision(s) 50972:
unak Jul 7, 2015
a0cf0fb
merge revision(s) 50860: [Backport #11249]
unak Jul 7, 2015
c7458b5
merge revision(s) 50834: [Backport #11221]
unak Jul 7, 2015
e9ea9d6
merge revision(s) 49542: [Backport #10820]
unak Aug 17, 2015
b2bb029
merge revision(s) 50827,50921: [Backport #11235]
unak Aug 17, 2015
7766666
merge revision(s) 51037: [Backport #11277]
unak Aug 17, 2015
a61756e
merge revision(s) 49788,49790: [Backport #10904]
unak Aug 17, 2015
51954bd
merge revision(s) 51344: [Backport #11387]
unak Aug 17, 2015
59f1eaa
merge revision(s) 51263,51264: [Backport #11352]
unak Aug 17, 2015
9580200
merge revision(s) 51061,51063,51091: [Backport #11285]
unak Aug 17, 2015
ccef579
merge revision(s) 51213: [Backport #11344]
unak Aug 17, 2015
d3a6478
merge revision(s) 51531: [Backport #11368]
unak Aug 17, 2015
510bdd1
merge revision(s) 51350: [Backport #11380]
unak Aug 17, 2015
bd929bb
merge revision(s) 51202,51203,51204: [Backport #11340]
unak Aug 17, 2015
d3cd7b4
merge revision(s) 51409,51453: [Backport #10910]
unak Aug 17, 2015
a5ffcda
merge revision(s) 46681,51464,51465: [Backport #11058]
unak Aug 17, 2015
190241f
merge revision(s) 51046: [Backport #11260]
unak Aug 17, 2015
813b5f4
merge revision(s) 51066: [Backport #11319]
unak Aug 17, 2015
445954a
merge revision(s) 44497: [Backport #11441]
unak Aug 17, 2015
170f64d
merge revision(s) 51423,51425: [Backport #9381]
unak Aug 17, 2015
4bf7894
merge revision(s) 51116: [Backport #11324]
unak Aug 17, 2015
26eb8e4
merge revision(s) 51470: [Backport #11413]
unak Aug 17, 2015
911ade3
merge revision(s) 51575,51584: [Backport #11439]
unak Aug 17, 2015
9ce1bf8
merge revision(s) 50829: [Backport #11248]
unak Aug 18, 2015
0f66473
add tag v2_1_7
unak Aug 18, 2015
eef7698
Merge tag 'v2_1_7' into 2.1
dbussink Aug 19, 2015
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
merge revision(s) 51213: [Backport ruby#11344]
	* lib/timeout.rb (ExitException): removed internal exception class
	  and use Timeout::Error instead, as using throw/catch to isolate
	  each timeouts now.  [ruby-dev:49179] [Bug ruby#11344]


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_2_1@51603 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
  • Loading branch information
unak committed Aug 17, 2015
commit ccef579aee4ab784e1a46ea755d2717224f628c2
12 changes: 12 additions & 0 deletions ChangeLog
Original file line number Diff line number Diff line change
@@ -1,3 +1,15 @@
Mon Aug 17 16:51:45 2015 CHIKANAGA Tomoyuki <[email protected]>

* lib/timeout.rb (ExitException): leave Timeout::ExitException as an
alias of Timeout::Error for backward compatibility in stable branch.
[ruby-dev:49179] [Bug #11344]

Mon Aug 17 16:51:45 2015 Nobuyoshi Nakada <[email protected]>

* lib/timeout.rb (ExitException): removed internal exception class
and use Timeout::Error instead, as using throw/catch to isolate
each timeouts now. [ruby-dev:49179] [Bug #11344]

Mon Aug 17 16:49:00 2015 Kazuhiro NISHIYAMA <[email protected]>

* test/net/http/test_httpresponse.rb
Expand Down
5 changes: 2 additions & 3 deletions lib/timeout.rb
Original file line number Diff line number Diff line change
Expand Up @@ -24,8 +24,6 @@
module Timeout
# Raised by Timeout#timeout when the block times out.
class Error < RuntimeError
end
class ExitException < ::Exception # :nodoc:
attr_reader :thread

def self.catch(*args)
Expand All @@ -48,6 +46,7 @@ def exception(*)
self
end
end
ExitException = Error

# :stopdoc:
THIS_FILE = /\A#{Regexp.quote(__FILE__)}:/o
Expand Down Expand Up @@ -103,7 +102,7 @@ def timeout(sec, klass = nil) #:yield: +sec+
bt = e.backtrace
end
else
bt = ExitException.catch(message, &bl)
bt = Error.catch(message, &bl)
end
rej = /\A#{Regexp.quote(__FILE__)}:#{__LINE__-4}\z/o
bt.reject! {|m| rej =~ m}
Expand Down
23 changes: 20 additions & 3 deletions test/test_timeout.rb
Original file line number Diff line number Diff line change
Expand Up @@ -63,9 +63,9 @@ def initialize(msg) super end
end

def test_exit_exception
assert_raise_with_message(Timeout::ExitException, "boon") do
Timeout.timeout(10, Timeout::ExitException) do
raise Timeout::ExitException, "boon"
assert_raise_with_message(Timeout::Error, "boon") do
Timeout.timeout(10, Timeout::Error) do
raise Timeout::Error, "boon"
end
end
end
Expand All @@ -80,4 +80,21 @@ def o.each
Timeout.timeout(0.01) {e.next}
end
end

def test_handle_interrupt
bug11344 = '[ruby-dev:49179] [Bug #11344]'
ok = false
assert_raise(Timeout::Error) {
Thread.handle_interrupt(Timeout::Error => :never) {
Timeout.timeout(0.01) {
sleep 0.2
ok = true
Thread.handle_interrupt(Timeout::Error => :on_blocking) {
sleep 0.2
}
}
}
}
assert(ok, bug11344)
end
end
2 changes: 1 addition & 1 deletion version.h
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#define RUBY_VERSION "2.1.7"
#define RUBY_RELEASE_DATE "2015-08-17"
#define RUBY_PATCHLEVEL 386
#define RUBY_PATCHLEVEL 387

#define RUBY_RELEASE_YEAR 2015
#define RUBY_RELEASE_MONTH 8
Expand Down