Ruby Issue Tracking System: Issueshttps://bugs.ruby-lang.org/https://bugs.ruby-lang.org/favicon.ico?17113305112014-01-02T09:11:37ZRuby Issue Tracking System
Redmine Ruby master - Bug #9340 (Closed): Document order related behavior in Array#uniqhttps://bugs.ruby-lang.org/issues/93402014-01-02T09:11:37Zagrimm (Andrew Grimm)andrew.j.grimm@gmail.com
<p>The behavior of Array#uniq without a block in Ruby 2.1.0 is inconsistent with the behavior of Array#uniq in Ruby 2.0.0, and with the behavior of Array#uniq with a block in Ruby 2.1.0.</p>
<p>Array#uniq without a block in Ruby 2.1.0 returns the last item that is duplicate, while everything else returns the first item that is duplicate.</p>
<pre><code>class Person
attr_reader :name
def initialize(id, name)
# @id is not used by hash or eql?
@id = id
@name = name
end
def hash
[@name].hash
end
def eql?(other)
[@name].eql?([other.name])
end
end
p1 = Person.new(1, "Bob")
p2 = Person.new(2, "Bob")
p3 = Person.new(3, "Bob")
arr = [p1, p2, p3]
arr2 = arr.uniq {|p| p}
arr3 = arr.uniq
p RUBY_VERSION
p arr2
p arr3
</code></pre>
<p>Gives</p>
<pre><code>"2.1.0"
[#<Person:0x007f1b47ef7720 @id=1, @name="Bob">]
[#<Person:0x007f1b47ef7680 @id=3, @name="Bob">]
"2.0.0"
[#<Person:0x007ffa9203bf30 @id=1, @name="Bob">]
[#<Person:0x007ffa9203bf30 @id=1, @name="Bob">]
</code></pre>
<p>This behavior does not contradict what RDoc says about Array#uniq, so people ought not to rely upon which duplicate item is chosen. However, at the very least, different behavior for Array#uniq with and without a block would be somewhat unexpected.</p>
<p>Should the documentation explicitly warn that uniq is not guaranteed to choose the first duplicate item?</p>
<p>As Ruby 2.1.0 has already been released, I assume it is too late to change the behavior of Array#uniq .</p> Ruby master - Bug #8975 (Closed): Confusing code sample for assert_sendhttps://bugs.ruby-lang.org/issues/89752013-10-02T07:48:42Zagrimm (Andrew Grimm)andrew.j.grimm@gmail.com
<p>Test::Unit::Assertsions#assert_send has the code sample</p>
<pre><code>assert_send([[1, 2], :member?, 1]) # -> pass
assert_send([[1, 2], :member?, 4]) # -> fail
</code></pre>
<p>Having an array within an array is somewhat confusing. When I first read it, I ignored the extra square brackets. A less confusing example would be</p>
<pre><code>assert_send(["Hello world", :include?, "Hello"]) # -> pass
assert_send(["Hello world", :include?, "Goodbye"]) # -> fail
</code></pre> Ruby master - Feature #8691 (Closed): Add warning for variable that is re-assigned but not re-usedhttps://bugs.ruby-lang.org/issues/86912013-07-26T08:52:52Zagrimm (Andrew Grimm)andrew.j.grimm@gmail.com
<p>The following code</p>
<p>def reassigned_unused<br>
a = 42<br>
b = a.to_s<br>
a = 56<br>
b<br>
end</p>
<p>Does not currently generate an "assigned but unused variable" warning about the second assignment to "a".</p>
<p>Is it feasible to create a warning for such a scenario?</p> Ruby master - Bug #8351 (Closed): Error message is not grammaticalhttps://bugs.ruby-lang.org/issues/83512013-05-01T16:54:29Zagrimm (Andrew Grimm)andrew.j.grimm@gmail.com
<p>Enumerable#chunk has the error message "symbol begins with an underscore is reserved".</p>
<p>This is not grammatical. Assuming that error messages can be modified, possible fixes include</p>
<p>"symbol begins with an underscore, which is reserved"<br>
"symbols beginning with an underscore are reserved"</p> Ruby master - Bug #7920 (Closed): Version of RubyGems in NEWS incorrecthttps://bugs.ruby-lang.org/issues/79202013-02-23T22:29:24Zagrimm (Andrew Grimm)andrew.j.grimm@gmail.com
<p>NEWS claims that RubyGems 2.0.0.preview2 is used, but according to ChangeLog, 2.0.0 (non-preview) is used.</p>
<p>If there's any changes between 2.0.0.preview2, and 2.0.0 for RubyGems, additional changes to NEWS may be required.</p>
<p>A patch is attached.</p> Ruby master - Feature #7730 (Closed): Top level variables aren't checked for assigned but unused ...https://bugs.ruby-lang.org/issues/77302013-01-23T15:51:32Zagrimm (Andrew Grimm)andrew.j.grimm@gmail.com
<p>In the following code, variable a in the method gets a warning, but variable b in top level code doesn't get any warning</p>
<pre><code>def warning_method
a = 2
end
b = 2
warning_method
$ ruby -w no_toplevel_warnings.rb
no_toplevel_warnings.rb:2: warning: assigned but unused variable - a
</code></pre>
<p>It is possible to detect that b is unused if the script is required from another script.</p>
<p>I'd like Ruby to be able to detect that b is an assigned but unused variable.</p> Backport193 - Backport #7408 (Closed): Assigned but unused warning cancelled by symbolhttps://bugs.ruby-lang.org/issues/74082012-11-20T18:00:51Zagrimm (Andrew Grimm)andrew.j.grimm@gmail.com
<p>If there is a symbol with the same name as an unused local variable, there is no "assigned but unused variable"</p>
<p>=begin<br>
# no_warning.rb<br>
def no_warning<br>
foo = 1<br>
{:foo => 1}<br>
end</p>
<pre><code>def has_warning
foo = 1
{:bar => 1}
end
</code></pre>
<p>$ ruby -v<br>
ruby 2.0.0dev (2012-11-18) [x86_64-darwin10.8.0]<br>
$ ruby -w no_warning.rb<br>
no_warning.rb:8: warning: assigned but unused variable - foo</p>
<p>=end</p> Ruby master - Bug #7119 (Third Party's Issue): Running wisp causes a segmentation faulthttps://bugs.ruby-lang.org/issues/71192012-10-08T19:15:59Zagrimm (Andrew Grimm)andrew.j.grimm@gmail.com
<p>=begin<br>
Running Wisp causes a segmentation fault.</p>
<p>Wisp is only version 0.1.0, but its code is too simple for it itself to cause a segmentation fault.</p>
<pre><code>192-168-1-6:Wisp agrimm$ ruby -rwisp examples/loop.rb
== Sinatra/1.3.2 has taken the stage on 4567 for development with backup from Thin
>> Thin web server (v1.3.1 codename Triple Espresso)
>> Maximum connections set to 1024
>> Listening on 0.0.0.0:4567, CTRL+C to stop
/Users/agrimm/.rvm/gems/ruby-head/gems/eventmachine-0.12.10/lib/em/connection.rb:470: [BUG] Segmentation fault
ruby 2.0.0dev (2012-09-28 trunk 37049) [x86_64-darwin10.8.0]
-- Control frame information -----------------------------------------------
c:0015 p:---- s:0068 e:000067 CFUNC :set_comm_inactivity_timeout
c:0014 p:0028 s:0063 e:000062 METHOD /Users/agrimm/.rvm/gems/ruby-head/gems/eventmachine-0.12.10/lib/em/connection.rb:470
c:0013 p:0013 s:0059 e:000058 METHOD /Users/agrimm/.rvm/gems/ruby-head/gems/eventmachine-0.12.10/lib/em/connection.rb:460
c:0012 p:0047 s:0055 e:000054 METHOD /Users/agrimm/.rvm/gems/ruby-head/gems/thin-1.3.1/lib/thin/backends/base.rb:130 [FINISH]
c:0011 p:---- s:0051 e:000050 IFUNC
c:0010 p:---- s:0049 e:000048 CFUNC :call
c:0009 p:0198 s:0045 e:000044 METHOD /Users/agrimm/.rvm/gems/ruby-head/gems/eventmachine-0.12.10/lib/eventmachine.rb:1432 [FINISH]
c:0008 p:---- s:0034 e:000033 CFUNC :run_machine
c:0007 p:0244 s:0031 e:000030 METHOD /Users/agrimm/.rvm/gems/ruby-head/gems/eventmachine-0.12.10/lib/eventmachine.rb:256
c:0006 p:0066 s:0024 e:000760 METHOD /Users/agrimm/.rvm/gems/ruby-head/gems/thin-1.3.1/lib/thin/backends/base.rb:61
c:0005 p:0143 s:0020 e:000019 METHOD /Users/agrimm/.rvm/gems/ruby-head/gems/thin-1.3.1/lib/thin/server.rb:159
c:0004 p:0081 s:0017 e:000016 METHOD /Users/agrimm/.rvm/gems/ruby-head/gems/rack-1.3.6/lib/rack/handler/thin.rb:13
c:0003 p:0082 s:0011 e:001ca8 METHOD /Users/agrimm/.rvm/gems/ruby-head/gems/sinatra-1.3.2/lib/sinatra/base.rb:1295
c:0002 p:0015 s:0004 e:000003 BLOCK /Users/agrimm/.rvm/gems/ruby-head/gems/wisp-0.1.0/lib/wisp.rb:87 [FINISH]
c:0001 p:---- s:0002 e:000001 TOP [FINISH]
/Users/agrimm/.rvm/gems/ruby-head/gems/wisp-0.1.0/lib/wisp.rb:87:in `block in <top (required)>'
/Users/agrimm/.rvm/gems/ruby-head/gems/sinatra-1.3.2/lib/sinatra/base.rb:1295:in `run!'
/Users/agrimm/.rvm/gems/ruby-head/gems/rack-1.3.6/lib/rack/handler/thin.rb:13:in `run'
/Users/agrimm/.rvm/gems/ruby-head/gems/thin-1.3.1/lib/thin/server.rb:159:in `start'
/Users/agrimm/.rvm/gems/ruby-head/gems/thin-1.3.1/lib/thin/backends/base.rb:61:in `start'
/Users/agrimm/.rvm/gems/ruby-head/gems/eventmachine-0.12.10/lib/eventmachine.rb:256:in `run'
/Users/agrimm/.rvm/gems/ruby-head/gems/eventmachine-0.12.10/lib/eventmachine.rb:256:in `run_machine'
/Users/agrimm/.rvm/gems/ruby-head/gems/eventmachine-0.12.10/lib/eventmachine.rb:1432:in `event_callback'
/Users/agrimm/.rvm/gems/ruby-head/gems/eventmachine-0.12.10/lib/eventmachine.rb:1432:in `call'
/Users/agrimm/.rvm/gems/ruby-head/gems/thin-1.3.1/lib/thin/backends/base.rb:130:in `initialize_connection'
/Users/agrimm/.rvm/gems/ruby-head/gems/eventmachine-0.12.10/lib/em/connection.rb:460:in `comm_inactivity_timeout='
/Users/agrimm/.rvm/gems/ruby-head/gems/eventmachine-0.12.10/lib/em/connection.rb:470:in `set_comm_inactivity_timeout'
/Users/agrimm/.rvm/gems/ruby-head/gems/eventmachine-0.12.10/lib/em/connection.rb:470:in `set_comm_inactivity_timeout'
-- C level backtrace information -------------------------------------------
See Crash Report log file under ~/Library/Logs/CrashReporter or
/Library/Logs/CrashReporter, for the more detail of.
-- Other runtime information -----------------------------------------------
* Loaded script: examples/loop.rb
* Loaded features:
0 enumerator.so
1 /Users/agrimm/.rvm/rubies/ruby-head/lib/ruby/2.0.0/x86_64-darwin10.8.0/enc/encdb.bundle
2 /Users/agrimm/.rvm/rubies/ruby-head/lib/ruby/2.0.0/x86_64-darwin10.8.0/enc/trans/transdb.bundle
3 /Users/agrimm/.rvm/rubies/ruby-head/lib/ruby/site_ruby/2.0.0/rubygems/defaults.rb
4 /Users/agrimm/.rvm/rubies/ruby-head/lib/ruby/2.0.0/x86_64-darwin10.8.0/rbconfig.rb
5 /Users/agrimm/.rvm/rubies/ruby-head/lib/ruby/site_ruby/2.0.0/rubygems/deprecate.rb
6 /Users/agrimm/.rvm/rubies/ruby-head/lib/ruby/site_ruby/2.0.0/rubygems/exceptions.rb
7 /Users/agrimm/.rvm/rubies/ruby-head/lib/ruby/site_ruby/2.0.0/rubygems/custom_require.rb
8 /Users/agrimm/.rvm/rubies/ruby-head/lib/ruby/site_ruby/2.0.0/rubygems.rb
9 /Users/agrimm/.rvm/rubies/ruby-head/lib/ruby/site_ruby/2.0.0/rubygems/version.rb
10 /Users/agrimm/.rvm/rubies/ruby-head/lib/ruby/site_ruby/2.0.0/rubygems/requirement.rb
11 /Users/agrimm/.rvm/rubies/ruby-head/lib/ruby/site_ruby/2.0.0/rubygems/platform.rb
12 /Users/agrimm/.rvm/rubies/ruby-head/lib/ruby/site_ruby/2.0.0/rubygems/specification.rb
13 /Users/agrimm/.rvm/rubies/ruby-head/lib/ruby/site_ruby/2.0.0/rubygems/path_support.rb
14 /Users/agrimm/.rvm/rubies/ruby-head/lib/ruby/site_ruby/2.0.0/rubygems/dependency.rb
15 /Users/agrimm/.rvm/gems/ruby-head/gems/rack-1.3.6/lib/rack.rb
16 /Users/agrimm/.rvm/gems/ruby-head/gems/tilt-1.3.3/lib/tilt/template.rb
17 /Users/agrimm/.rvm/gems/ruby-head/gems/tilt-1.3.3/lib/tilt/string.rb
18 /Users/agrimm/.rvm/gems/ruby-head/gems/tilt-1.3.3/lib/tilt/erb.rb
19 /Users/agrimm/.rvm/gems/ruby-head/gems/tilt-1.3.3/lib/tilt/haml.rb
20 /Users/agrimm/.rvm/gems/ruby-head/gems/tilt-1.3.3/lib/tilt/css.rb
21 /Users/agrimm/.rvm/gems/ruby-head/gems/tilt-1.3.3/lib/tilt/coffee.rb
22 /Users/agrimm/.rvm/gems/ruby-head/gems/tilt-1.3.3/lib/tilt/nokogiri.rb
23 /Users/agrimm/.rvm/gems/ruby-head/gems/tilt-1.3.3/lib/tilt/builder.rb
24 /Users/agrimm/.rvm/gems/ruby-head/gems/tilt-1.3.3/lib/tilt/markaby.rb
25 /Users/agrimm/.rvm/gems/ruby-head/gems/tilt-1.3.3/lib/tilt/liquid.rb
26 /Users/agrimm/.rvm/gems/ruby-head/gems/tilt-1.3.3/lib/tilt/radius.rb
27 /Users/agrimm/.rvm/gems/ruby-head/gems/tilt-1.3.3/lib/tilt/markdown.rb
28 /Users/agrimm/.rvm/gems/ruby-head/gems/tilt-1.3.3/lib/tilt/textile.rb
29 /Users/agrimm/.rvm/gems/ruby-head/gems/tilt-1.3.3/lib/tilt/rdoc.rb
30 /Users/agrimm/.rvm/gems/ruby-head/gems/tilt-1.3.3/lib/tilt/wiki.rb
31 /Users/agrimm/.rvm/gems/ruby-head/gems/tilt-1.3.3/lib/tilt/yajl.rb
32 /Users/agrimm/.rvm/gems/ruby-head/gems/tilt-1.3.3/lib/tilt.rb
33 /Users/agrimm/.rvm/gems/ruby-head/gems/rack-protection-1.2.0/lib/rack/protection/version.rb
34 /Users/agrimm/.rvm/gems/ruby-head/gems/rack-protection-1.2.0/lib/rack/protection.rb
35 /Users/agrimm/.rvm/rubies/ruby-head/lib/ruby/2.0.0/thread.rb
36 /Users/agrimm/.rvm/rubies/ruby-head/lib/ruby/2.0.0/x86_64-darwin10.8.0/date_core.bundle
37 /Users/agrimm/.rvm/rubies/ruby-head/lib/ruby/2.0.0/date/format.rb
38 /Users/agrimm/.rvm/rubies/ruby-head/lib/ruby/2.0.0/date.rb
39 /Users/agrimm/.rvm/rubies/ruby-head/lib/ruby/2.0.0/time.rb
40 /Users/agrimm/.rvm/rubies/ruby-head/lib/ruby/2.0.0/uri/common.rb
41 /Users/agrimm/.rvm/rubies/ruby-head/lib/ruby/2.0.0/uri/generic.rb
42 /Users/agrimm/.rvm/rubies/ruby-head/lib/ruby/2.0.0/uri/ftp.rb
43 /Users/agrimm/.rvm/rubies/ruby-head/lib/ruby/2.0.0/uri/http.rb
44 /Users/agrimm/.rvm/rubies/ruby-head/lib/ruby/2.0.0/uri/https.rb
45 /Users/agrimm/.rvm/rubies/ruby-head/lib/ruby/2.0.0/uri/ldap.rb
46 /Users/agrimm/.rvm/rubies/ruby-head/lib/ruby/2.0.0/uri/ldaps.rb
47 /Users/agrimm/.rvm/rubies/ruby-head/lib/ruby/2.0.0/uri/mailto.rb
48 /Users/agrimm/.rvm/rubies/ruby-head/lib/ruby/2.0.0/uri.rb
49 /Users/agrimm/.rvm/rubies/ruby-head/lib/ruby/2.0.0/ostruct.rb
50 /Users/agrimm/.rvm/rubies/ruby-head/lib/ruby/2.0.0/cgi/util.rb
51 /Users/agrimm/.rvm/rubies/ruby-head/lib/ruby/2.0.0/x86_64-darwin10.8.0/strscan.bundle
52 /Users/agrimm/.rvm/rubies/ruby-head/lib/ruby/2.0.0/erb.rb
53 /Users/agrimm/.rvm/rubies/ruby-head/lib/ruby/2.0.0/x86_64-darwin10.8.0/etc.bundle
54 /Users/agrimm/.rvm/rubies/ruby-head/lib/ruby/2.0.0/fileutils.rb
55 /Users/agrimm/.rvm/rubies/ruby-head/lib/ruby/2.0.0/set.rb
56 /Users/agrimm/.rvm/rubies/ruby-head/lib/ruby/2.0.0/delegate.rb
57 /Users/agrimm/.rvm/rubies/ruby-head/lib/ruby/2.0.0/tmpdir.rb
58 /Users/agrimm/.rvm/rubies/ruby-head/lib/ruby/2.0.0/tempfile.rb
59 /Users/agrimm/.rvm/gems/ruby-head/gems/rack-1.3.6/lib/rack/multipart.rb
60 /Users/agrimm/.rvm/gems/ruby-head/gems/rack-1.3.6/lib/rack/utils.rb
61 /Users/agrimm/.rvm/gems/ruby-head/gems/rack-1.3.6/lib/rack/request.rb
62 /Users/agrimm/.rvm/gems/ruby-head/gems/rack-1.3.6/lib/rack/showexceptions.rb
63 /Users/agrimm/.rvm/gems/ruby-head/gems/sinatra-1.3.2/lib/sinatra/showexceptions.rb
64 /Users/agrimm/.rvm/gems/ruby-head/gems/sinatra-1.3.2/lib/sinatra/version.rb
65 /Users/agrimm/.rvm/gems/ruby-head/gems/rack-1.3.6/lib/rack/response.rb
66 /Users/agrimm/.rvm/rubies/ruby-head/lib/ruby/2.0.0/x86_64-darwin10.8.0/digest.bundle
67 /Users/agrimm/.rvm/rubies/ruby-head/lib/ruby/2.0.0/digest.rb
68 /Users/agrimm/.rvm/rubies/ruby-head/lib/ruby/2.0.0/x86_64-darwin10.8.0/openssl.bundle
69 /Users/agrimm/.rvm/rubies/ruby-head/lib/ruby/2.0.0/openssl/bn.rb
70 /Users/agrimm/.rvm/rubies/ruby-head/lib/ruby/2.0.0/openssl/cipher.rb
71 /Users/agrimm/.rvm/rubies/ruby-head/lib/ruby/2.0.0/x86_64-darwin10.8.0/stringio.bundle
72 /Users/agrimm/.rvm/rubies/ruby-head/lib/ruby/2.0.0/openssl/config.rb
73 /Users/agrimm/.rvm/rubies/ruby-head/lib/ruby/2.0.0/openssl/digest.rb
74 /Users/agrimm/.rvm/rubies/ruby-head/lib/ruby/2.0.0/openssl/x509.rb
75 /Users/agrimm/.rvm/rubies/ruby-head/lib/ruby/2.0.0/openssl/buffering.rb
76 /Users/agrimm/.rvm/rubies/ruby-head/lib/ruby/2.0.0/x86_64-darwin10.8.0/fcntl.bundle
77 /Users/agrimm/.rvm/rubies/ruby-head/lib/ruby/2.0.0/openssl/ssl.rb
78 /Users/agrimm/.rvm/rubies/ruby-head/lib/ruby/2.0.0/openssl.rb
79 /Users/agrimm/.rvm/rubies/ruby-head/lib/ruby/2.0.0/securerandom.rb
80 /Users/agrimm/.rvm/gems/ruby-head/gems/sinatra-1.3.2/lib/sinatra/base.rb
81 /Users/agrimm/.rvm/gems/ruby-head/gems/sinatra-1.3.2/lib/sinatra/main.rb
82 /Users/agrimm/.rvm/gems/ruby-head/gems/sinatra-1.3.2/lib/sinatra.rb
83 /Users/agrimm/.rvm/rubies/ruby-head/lib/ruby/2.0.0/timeout.rb
84 /Users/agrimm/.rvm/rubies/ruby-head/lib/ruby/2.0.0/forwardable.rb
85 /Users/agrimm/.rvm/gems/ruby-head/gems/eventmachine-0.12.10/lib/rubyeventmachine.bundle
86 /Users/agrimm/.rvm/gems/ruby-head/gems/eventmachine-0.12.10/lib/em/version.rb
87 /Users/agrimm/.rvm/gems/ruby-head/gems/eventmachine-0.12.10/lib/em/deferrable.rb
88 /Users/agrimm/.rvm/gems/ruby-head/gems/eventmachine-0.12.10/lib/em/future.rb
89 /Users/agrimm/.rvm/gems/ruby-head/gems/eventmachine-0.12.10/lib/em/streamer.rb
90 /Users/agrimm/.rvm/gems/ruby-head/gems/eventmachine-0.12.10/lib/em/spawnable.rb
91 /Users/agrimm/.rvm/gems/ruby-head/gems/eventmachine-0.12.10/lib/em/processes.rb
92 /Users/agrimm/.rvm/gems/ruby-head/gems/eventmachine-0.12.10/lib/em/buftok.rb
93 /Users/agrimm/.rvm/gems/ruby-head/gems/eventmachine-0.12.10/lib/em/timers.rb
94 /Users/agrimm/.rvm/gems/ruby-head/gems/eventmachine-0.12.10/lib/em/protocols.rb
95 /Users/agrimm/.rvm/gems/ruby-head/gems/eventmachine-0.12.10/lib/em/connection.rb
96 /Users/agrimm/.rvm/gems/ruby-head/gems/eventmachine-0.12.10/lib/em/callback.rb
97 /Users/agrimm/.rvm/gems/ruby-head/gems/eventmachine-0.12.10/lib/em/queue.rb
98 /Users/agrimm/.rvm/gems/ruby-head/gems/eventmachine-0.12.10/lib/em/channel.rb
99 /Users/agrimm/.rvm/gems/ruby-head/gems/eventmachine-0.12.10/lib/em/file_watch.rb
100 /Users/agrimm/.rvm/gems/ruby-head/gems/eventmachine-0.12.10/lib/em/process_watch.rb
101 /Users/agrimm/.rvm/rubies/ruby-head/lib/ruby/2.0.0/shellwords.rb
102 /Users/agrimm/.rvm/gems/ruby-head/gems/eventmachine-0.12.10/lib/eventmachine.rb
103 /Users/agrimm/.rvm/gems/ruby-head/gems/thin-1.3.1/lib/thin/version.rb
104 /Users/agrimm/.rvm/gems/ruby-head/gems/thin-1.3.1/lib/thin/statuses.rb
105 /Users/agrimm/.rvm/gems/ruby-head/gems/thin-1.3.1/lib/rack/adapter/loader.rb
106 /Users/agrimm/.rvm/gems/ruby-head/gems/thin-1.3.1/lib/thin_parser.bundle
107 /Users/agrimm/.rvm/gems/ruby-head/gems/thin-1.3.1/lib/thin.rb
108 /Users/agrimm/.rvm/gems/ruby-head/gems/em-websocket-0.3.8/lib/em-websocket/debugger.rb
109 /Users/agrimm/.rvm/gems/ruby-head/gems/em-websocket-0.3.8/lib/em-websocket/websocket.rb
110 /Users/agrimm/.rvm/gems/ruby-head/gems/addressable-2.3.2/lib/addressable/version.rb
111 /Users/agrimm/.rvm/gems/ruby-head/gems/addressable-2.3.2/lib/addressable/idna/pure.rb
112 /Users/agrimm/.rvm/gems/ruby-head/gems/addressable-2.3.2/lib/addressable/idna.rb
113 /Users/agrimm/.rvm/gems/ruby-head/gems/addressable-2.3.2/lib/addressable/uri.rb
114 /Users/agrimm/.rvm/gems/ruby-head/gems/em-websocket-0.3.8/lib/em-websocket/connection.rb
115 /Users/agrimm/.rvm/gems/ruby-head/gems/em-websocket-0.3.8/lib/em-websocket/handshake75.rb
116 /Users/agrimm/.rvm/rubies/ruby-head/lib/ruby/2.0.0/x86_64-darwin10.8.0/digest/md5.bundle
117 /Users/agrimm/.rvm/gems/ruby-head/gems/em-websocket-0.3.8/lib/em-websocket/handshake76.rb
118 /Users/agrimm/.rvm/rubies/ruby-head/lib/ruby/2.0.0/x86_64-darwin10.8.0/digest/sha1.bundle
119 /Users/agrimm/.rvm/rubies/ruby-head/lib/ruby/2.0.0/base64.rb
120 /Users/agrimm/.rvm/gems/ruby-head/gems/em-websocket-0.3.8/lib/em-websocket/handshake04.rb
121 /Users/agrimm/.rvm/gems/ruby-head/gems/em-websocket-0.3.8/lib/em-websocket/framing76.rb
122 /Users/agrimm/.rvm/gems/ruby-head/gems/em-websocket-0.3.8/lib/em-websocket/framing03.rb
123 /Users/agrimm/.rvm/gems/ruby-head/gems/em-websocket-0.3.8/lib/em-websocket/framing04.rb
124 /Users/agrimm/.rvm/gems/ruby-head/gems/em-websocket-0.3.8/lib/em-websocket/framing05.rb
125 /Users/agrimm/.rvm/gems/ruby-head/gems/em-websocket-0.3.8/lib/em-websocket/framing07.rb
126 /Users/agrimm/.rvm/gems/ruby-head/gems/em-websocket-0.3.8/lib/em-websocket/close75.rb
127 /Users/agrimm/.rvm/gems/ruby-head/gems/em-websocket-0.3.8/lib/em-websocket/close03.rb
128 /Users/agrimm/.rvm/gems/ruby-head/gems/em-websocket-0.3.8/lib/em-websocket/close05.rb
129 /Users/agrimm/.rvm/gems/ruby-head/gems/em-websocket-0.3.8/lib/em-websocket/close06.rb
130 /Users/agrimm/.rvm/gems/ruby-head/gems/em-websocket-0.3.8/lib/em-websocket/masking04.rb
131 /Users/agrimm/.rvm/gems/ruby-head/gems/em-websocket-0.3.8/lib/em-websocket/message_processor_03.rb
132 /Users/agrimm/.rvm/gems/ruby-head/gems/em-websocket-0.3.8/lib/em-websocket/message_processor_06.rb
133 /Users/agrimm/.rvm/gems/ruby-head/gems/em-websocket-0.3.8/lib/em-websocket/handler_factory.rb
134 /Users/agrimm/.rvm/gems/ruby-head/gems/em-websocket-0.3.8/lib/em-websocket/handler.rb
135 /Users/agrimm/.rvm/gems/ruby-head/gems/em-websocket-0.3.8/lib/em-websocket/handler75.rb
136 /Users/agrimm/.rvm/gems/ruby-head/gems/em-websocket-0.3.8/lib/em-websocket/handler76.rb
137 /Users/agrimm/.rvm/gems/ruby-head/gems/em-websocket-0.3.8/lib/em-websocket/handler03.rb
138 /Users/agrimm/.rvm/gems/ruby-head/gems/em-websocket-0.3.8/lib/em-websocket/handler05.rb
139 /Users/agrimm/.rvm/gems/ruby-head/gems/em-websocket-0.3.8/lib/em-websocket/handler06.rb
140 /Users/agrimm/.rvm/gems/ruby-head/gems/em-websocket-0.3.8/lib/em-websocket/handler07.rb
141 /Users/agrimm/.rvm/gems/ruby-head/gems/em-websocket-0.3.8/lib/em-websocket/handler08.rb
142 /Users/agrimm/.rvm/gems/ruby-head/gems/em-websocket-0.3.8/lib/em-websocket/handler13.rb
143 /Users/agrimm/.rvm/gems/ruby-head/gems/em-websocket-0.3.8/lib/em-websocket.rb
144 /Users/agrimm/.rvm/rubies/ruby-head/lib/ruby/2.0.0/x86_64-darwin10.8.0/socket.bundle
145 /Users/agrimm/.rvm/rubies/ruby-head/lib/ruby/2.0.0/socket.rb
146 /Users/agrimm/.rvm/gems/ruby-head/gems/thin-1.3.1/lib/thin/logging.rb
147 /Users/agrimm/.rvm/gems/ruby-head/gems/thin-1.3.1/lib/thin/connection.rb
148 /Users/agrimm/.rvm/gems/ruby-head/gems/sinatra-websocket-0.1.2/lib/sinatra-websocket/ext/thin/connection.rb
149 /Users/agrimm/.rvm/gems/ruby-head/gems/sinatra-websocket-0.1.2/lib/sinatra-websocket/ext/sinatra/request.rb
150 /Users/agrimm/.rvm/gems/ruby-head/gems/sinatra-websocket-0.1.2/lib/sinatra-websocket.rb
151 /Users/agrimm/.rvm/rubies/ruby-head/lib/ruby/2.0.0/json/version.rb
152 /Users/agrimm/.rvm/rubies/ruby-head/lib/ruby/2.0.0/json/generic_object.rb
153 /Users/agrimm/.rvm/rubies/ruby-head/lib/ruby/2.0.0/json/common.rb
154 /Users/agrimm/.rvm/rubies/ruby-head/lib/ruby/2.0.0/x86_64-darwin10.8.0/enc/utf_16be.bundle
155 /Users/agrimm/.rvm/rubies/ruby-head/lib/ruby/2.0.0/x86_64-darwin10.8.0/enc/utf_16le.bundle
156 /Users/agrimm/.rvm/rubies/ruby-head/lib/ruby/2.0.0/x86_64-darwin10.8.0/enc/utf_32be.bundle
157 /Users/agrimm/.rvm/rubies/ruby-head/lib/ruby/2.0.0/x86_64-darwin10.8.0/enc/utf_32le.bundle
158 /Users/agrimm/.rvm/rubies/ruby-head/lib/ruby/2.0.0/x86_64-darwin10.8.0/json/ext/parser.bundle
159 /Users/agrimm/.rvm/rubies/ruby-head/lib/ruby/2.0.0/x86_64-darwin10.8.0/json/ext/generator.bundle
160 /Users/agrimm/.rvm/rubies/ruby-head/lib/ruby/2.0.0/json/ext.rb
161 /Users/agrimm/.rvm/rubies/ruby-head/lib/ruby/2.0.0/json.rb
162 /Users/agrimm/.rvm/gems/ruby-head/gems/rack-1.3.6/lib/rack/handler.rb
163 /Users/agrimm/.rvm/gems/ruby-head/gems/rack-1.3.6/lib/rack/content_length.rb
164 /Users/agrimm/.rvm/gems/ruby-head/gems/rack-1.3.6/lib/rack/chunked.rb
165 /Users/agrimm/.rvm/gems/ruby-head/gems/rack-1.3.6/lib/rack/handler/thin.rb
166 /Users/agrimm/.rvm/rubies/ruby-head/lib/ruby/2.0.0/optparse.rb
167 /Users/agrimm/.rvm/rubies/ruby-head/lib/ruby/2.0.0/optparse/time.rb
168 /Users/agrimm/.rvm/gems/ruby-head/gems/daemons-1.1.8/lib/daemons/pid.rb
169 /Users/agrimm/.rvm/gems/ruby-head/gems/daemons-1.1.8/lib/daemons/pidfile.rb
170 /Users/agrimm/.rvm/gems/ruby-head/gems/daemons-1.1.8/lib/daemons/cmdline.rb
171 /Users/agrimm/.rvm/gems/ruby-head/gems/daemons-1.1.8/lib/daemons/exceptions.rb
172 /Users/agrimm/.rvm/gems/ruby-head/gems/daemons-1.1.8/lib/daemons/daemonize.rb
173 /Users/agrimm/.rvm/gems/ruby-head/gems/daemons-1.1.8/lib/daemons/monitor.rb
174 /Users/agrimm/.rvm/gems/ruby-head/gems/daemons-1.1.8/lib/daemons/pidmem.rb
175 /Users/agrimm/.rvm/gems/ruby-head/gems/daemons-1.1.8/lib/daemons/etc_extension.rb
176 /Users/agrimm/.rvm/gems/ruby-head/gems/daemons-1.1.8/lib/daemons/change_privilege.rb
177 /Users/agrimm/.rvm/gems/ruby-head/gems/daemons-1.1.8/lib/daemons/application.rb
178 /Users/agrimm/.rvm/gems/ruby-head/gems/daemons-1.1.8/lib/daemons/application_group.rb
179 /Users/agrimm/.rvm/gems/ruby-head/gems/daemons-1.1.8/lib/daemons/controller.rb
180 /Users/agrimm/.rvm/gems/ruby-head/gems/daemons-1.1.8/lib/daemons.rb
181 /Users/agrimm/.rvm/gems/ruby-head/gems/thin-1.3.1/lib/thin/daemonizing.rb
182 /Users/agrimm/.rvm/gems/ruby-head/gems/thin-1.3.1/lib/thin/server.rb
183 /Users/agrimm/.rvm/gems/ruby-head/gems/thin-1.3.1/lib/thin/backends/base.rb
184 /Users/agrimm/.rvm/gems/ruby-head/gems/thin-1.3.1/lib/thin/backends/tcp_server.rb
185 /Users/agrimm/.rvm/gems/ruby-head/gems/thin-1.3.1/lib/thin/request.rb
186 /Users/agrimm/.rvm/gems/ruby-head/gems/thin-1.3.1/lib/thin/response.rb
187 /Users/agrimm/.rvm/gems/ruby-head/gems/thin-1.3.1/lib/thin/headers.rb
[NOTE]
You may have encountered a bug in the Ruby interpreter or extension libraries.
Bug reports are welcome.
For details: http://www.ruby-lang.org/bugreport.html
Abort trap
192-168-1-6:~ agrimm$ gem list
*** LOCAL GEMS ***
a (3.a, 2, 1)
a_evil (9)
abstract (1.0.0)
actionmailer (3.1.3)
actionpack (3.1.3)
activefacts-api (0.8.12)
activemodel (3.1.3)
activerecord (3.1.3)
activeresource (3.1.3)
activesupport (3.1.3, 2.3.14)
addressable (2.3.2)
ansi (1.4.1)
archive-tar-minitar (0.5.2)
arel (2.2.1)
axiom_of_choice (1.0.0)
b (2)
bananajour (2.6.9)
bio (1.4.2, 1.4.1)
bones (3.7.3)
bones-git (1.2.4)
builder (3.0.0)
bundler (1.2.1, 1.1.5, 1.0.15)
c (1.2)
coffee-rails (3.1.1)
coffee-script (2.2.0)
coffee-script-source (1.2.0, 1.1.3)
cucumber (1.1.4)
daemons (1.1.8)
dep_x (1)
diff-lcs (1.1.3)
dnssd (1.4)
domain_name (0.5.3)
em-websocket (0.3.8)
erubis (2.7.0)
eventmachine (0.12.10)
execjs (1.2.13, 1.2.9)
geokit (1.6.5)
gherkin (2.7.1)
git (1.2.5)
grit (1.1.1)
haml (3.1.6)
heckle (1.4.3)
hike (1.2.1)
hoe (2.12.3)
i18n (0.6.0)
jeweler (1.6.2)
jquery-rails (1.0.19, 1.0.18)
json (1.6.4, 1.6.1)
laser (0.7.0.pre2)
libxml-ruby (2.3.2)
little-plugger (1.1.3)
loquacious (1.9.1)
mail (2.3.0)
mechanize (2.5.1)
mime-types (1.17.2)
minitest (3.5.0, 3.0.1)
multi_json (1.0.4, 1.0.3)
net-http-digest_auth (1.2.1)
net-http-persistent (2.7)
nokogiri (1.5.3)
ntlm-http (0.1.1)
object_regex (1.0.1)
ParseTree (3.0.7)
pl (1 i386-linux)
polyglot (0.3.3)
rack (1.3.6, 1.3.5)
rack-cache (1.1)
rack-mount (0.8.3)
rack-protection (1.2.0)
rack-ssl (1.3.2)
rack-test (0.6.1)
rails (3.1.3)
railties (3.1.3)
rainbow (1.1.4)
rake (0.9.2.2, 0.8.7)
rcov (0.9.9)
rdoc (3.12, 3.11)
reek (1.2.8)
rest-client (1.6.7)
ripper-plus (1.3.0)
roflbalt (0.0.2)
roodi (2.1.0)
rspec (2.10.0, 2.7.0)
rspec-core (2.10.1, 2.7.1)
rspec-expectations (2.10.0, 2.7.0)
rspec-mocks (2.10.1, 2.7.0)
ruby2ruby (1.3.1, 1.2.2)
ruby_core_source (0.1.5)
ruby_parser (2.3.1, 2.0.6)
rubygems-bundler (1.1.0, 1.0.7)
RubyInline (3.9.0)
rvm (1.11.3.5, 1.11.3.3)
sass (3.1.12, 3.1.10)
sass-rails (3.1.5)
sensis (0.0.3)
sexp_processor (3.0.5)
simplecov (0.6.4)
simplecov-html (0.5.3)
sinatra (1.3.2)
sinatra-websocket (0.1.2)
sprockets (2.0.3)
sqlite3 (1.3.5, 1.3.4)
stream (0.5)
term-ansicolor (1.0.7)
ternary_logic (1.0.1)
test-unit (2.4.4)
thin (1.3.1)
thor (0.14.6)
tilt (1.3.3)
treetop (1.4.10)
trollop (1.16.2)
turn (0.8.3)
tzinfo (0.3.31)
uglifier (1.2.2, 1.1.0)
unf (0.0.5)
unf_ext (0.0.5)
webrobots (0.0.13)
wisp (0.1.0)
x (1)
ZenTest (4.7.0, 4.5.0)
192-168-1-6:Wisp agrimm$ ruby --version
ruby 2.0.0dev (2012-09-28 trunk 37049) [x86_64-darwin10.8.0]
</code></pre>
<p>On other versions of Ruby, the script didn't work in the expected manner (a web page was generated, but the page didn't show any lines of code being lit up by wisps), but it did not segfault.</p>
<p>Attached is OSX's crash file.<br>
=end</p> Ruby master - Bug #6872 (Closed): Array does not specify how it determines uniqueness of valueshttps://bugs.ruby-lang.org/issues/68722012-08-15T11:10:26Zagrimm (Andrew Grimm)andrew.j.grimm@gmail.com
<p>=begin<br>
The documentation of (({Array#uniq})) , and similar methods, does not specify how values are determined to be unique when a block is not given.</p>
<p>The Stack Overflow answer <a href="http://stackoverflow.com/a/8779948/38765" class="external">http://stackoverflow.com/a/8779948/38765</a> explains that (({Array#uniq})) works on the basis of looking at the hash method of each value in the array. However, this is not explained in the documentation of (({Array#uniq})) , or in (({Object#hash})) .</p>
<p>I think, but I'm not 100% sure, that there are other methods in Array that also use the hash method, such as (({Array#-})) . Ideally, all of these methods should be documented as using the hash method.<br>
=end</p> Ruby master - Bug #6381 (Third Party's Issue): Useful methods like included don't appear in RDochttps://bugs.ruby-lang.org/issues/63812012-04-30T08:26:07Zagrimm (Andrew Grimm)andrew.j.grimm@gmail.com
<p>=begin<br>
Methods like (({Module.included})) and (({Module.private_constant})) don't appear in ruby-doc.org's documentation, because they are private methods. This can cause difficulty for new users of Ruby, for example in <a href="http://stackoverflow.com/q/10369876/38765" class="external">http://stackoverflow.com/q/10369876/38765</a></p>
<p>While there is a rationale behind not showing some private methods, because they are implementation details that should not be relied upon by users of Ruby, this isn't the case here.</p>
<p>This issue has been discussed in ruby-core:40662 and elsewhere, but is something that needs to be put in a bug tracker.<br>
=end</p> Ruby master - Bug #5828 (Closed): Non anonymous classes can't be frozen, cloned and then inspectedhttps://bugs.ruby-lang.org/issues/58282011-12-31T10:06:00Zagrimm (Andrew Grimm)andrew.j.grimm@gmail.com
<p>=begin<br>
If you assign a class to a constant (that is, it isn't anonymous), and you freeze it and then clone it, you can't call to_s on it.</p>
<pre><code>MyClass = Class.new ; MyClass.freeze.clone.to_s
RuntimeError: can't modify frozen Class
from (irb):1:in `to_s'
from (irb):1
from /Users/agrimm/.rvm/rubies/ruby-head/bin/irb:16:in `<main>'
MyConstantObject = Object.new ; MyConstantObject.freeze.clone.to_s # => "#<Object:0x00000100884d60>"
MyClass_2 = Class.new ; MyClass_2.clone.to_s # => "#<Class:0x00000100872930>"
MyClass_3 = Class.new ; MyClass_3.freeze.to_s # => "MyClass_3"
MyClass_4 = Class.new.freeze ; MyClass_4.clone.to_s # => "#<Class:0x0000010088d4d8>"
MyClass_5 = Class.new.freeze ; MyClass_5.freeze.clone.to_s # => An exception
local_variable_class = Class.new ; local_variable_class.freeze.clone.to_s # => "#<Class:0x00000100964028>"
</code></pre>
<p>Presumably this is caused by class only determining whether it's assigned to a constant when it's first inspected.</p>
<p>I don't have a use case for freezing and cloning a class.<br>
=end</p> Ruby master - Bug #5625 (Third Party's Issue): Remove profanity and pejorativeshttps://bugs.ruby-lang.org/issues/56252011-11-13T21:54:45Zagrimm (Andrew Grimm)andrew.j.grimm@gmail.com
<p>There are currently 6 lines with the f-word, 4 lines with "wtf" that weren't just random combinations of letters, and one line with "bullshit".</p>
<p>While I personally dislike such profanity, the main benefit from getting rid of it is that it'd mean people of all ages could read Ruby's source code.</p>
<p>There's also three lines where "lame" is used as a pejorative. Using a group of people as a pejorative should be avoided.</p> Ruby master - Bug #5354 (Closed): Module#remove_const documentation is confusinghttps://bugs.ruby-lang.org/issues/53542011-09-23T07:57:00Zagrimm (Andrew Grimm)andrew.j.grimm@gmail.com
<p>=begin<br>
The documentation for Module#remove_const says:</p>
<blockquote>
<p>Removes the definition of the given constant, returning that constant’s value. Predefined classes and singleton objects (such as true) cannot be removed.</p>
</blockquote>
<p>Based on this documentation, someone said in <a href="http://stackoverflow.com/q/7513727/38765" class="external">http://stackoverflow.com/q/7513727/38765</a> that you can't do remove_const on the File constant, whereas you can.</p>
<p>class Object<br>
remove_const :File<br>
end</p>
<p>File # => NameError: uninitialized constant File</p>
<p>=end</p> Ruby master - Bug #5210 (Closed): Kernel#require documentation is incompletehttps://bugs.ruby-lang.org/issues/52102011-08-22T08:36:51Zagrimm (Andrew Grimm)andrew.j.grimm@gmail.com
<p>The documentation for Kernel#require could benefit from additional description.</p>
<p>It does not describe what a return method of false means. Many people initially think that a return value of false means that the require method was unsuccessful. See, for example, <a href="http://stackoverflow.com/q/1250329/38765" class="external">http://stackoverflow.com/q/1250329/38765</a> and <a href="http://stackoverflow.com/q/1793693/38765" class="external">http://stackoverflow.com/q/1793693/38765</a> . So explaining that it merely means that the library has already been loaded would be useful.</p>
<p>Mentioning that a LoadError is raised if unsuccessful would also be nice.</p>
<p>As a side issue, "it's" is used when it should be "its". The former means "it is", while the latter mean "something belonging to it".</p> Ruby master - Bug #5116 (Closed): Code example for URI::Parser is invalidhttps://bugs.ruby-lang.org/issues/51162011-07-30T10:38:33Zagrimm (Andrew Grimm)andrew.j.grimm@gmail.com
<p>The code example for URI::Parser#initialize is invalid Ruby code.</p>
<p>A patch is supplied.</p> Ruby master - Bug #4652 (Closed): Improvement for documentation of String#start_with? and end_with? https://bugs.ruby-lang.org/issues/46522011-05-08T21:51:05Zagrimm (Andrew Grimm)andrew.j.grimm@gmail.com
<p>=begin<br>
The documentation for (({String#start_with?})) and (({String#end_with?})) has a typo, and the English grammar can be improved. A patch fixing it is attached.<br>
=end</p> Ruby master - Bug #4581 (Closed): Documentation for Process.times is outdatedhttps://bugs.ruby-lang.org/issues/45812011-04-16T23:48:04Zagrimm (Andrew Grimm)andrew.j.grimm@gmail.com
<p>=begin<br>
The code sample for Process.times only mentions utime and stime, even though there's cutime and sctime as well. There's also a reference to "page 388", presumably of the first edition of the Pickaxe. Should that be updated or deleted?<br>
=end</p> Ruby master - Bug #4471 (Closed): sample list.rb generates warningshttps://bugs.ruby-lang.org/issues/44712011-03-06T11:05:24Zagrimm (Andrew Grimm)andrew.j.grimm@gmail.com
<p>=begin<br>
Running the file sample/list.rb using ruby -W2 generates warnings. I think sample code should not generate warnings, because samples should be examples of good code, not examples of bad code.</p>
<p>I don't mind if it's fixed by improving the script, or by deleting the script.<br>
=end</p> Ruby master - Bug #4469 (Closed): Documentation code examples contain camelCase method nameshttps://bugs.ruby-lang.org/issues/44692011-03-05T21:53:09Zagrimm (Andrew Grimm)andrew.j.grimm@gmail.com
<p>=begin<br>
Some code examples in documentation contain (({camelCase})) method names, rather than (({snake_case})).</p>
<p>The documentation should use (({snake_case})) so that new Rubyists know the conventional style.</p>
<p>A patch fixing the issue is attached.<br>
=end</p> Backport192 - Backport #4367 (Closed): Thread.kill segfaults when the object to be killed isn't a...https://bugs.ruby-lang.org/issues/43672011-02-04T22:43:47Zagrimm (Andrew Grimm)andrew.j.grimm@gmail.com
<p>=begin<br>
If something other than a thread is supplied to Thread.kill, a segfault occurs. For example, Thread.kill(nil) causes a segfault:</p>
<p>Andrew-Grimms-MacBook-Pro:~ agrimm$ ruby<br>
Thread.kill(nil)<br>
-:1: [BUG] Segmentation fault<br>
ruby 1.9.3dev (2011-01-29 trunk 30720) [x86_64-darwin10.4.0]</p>
<p>-- Control frame information -----------------------------------------------<br>
c:0004 p:---- s:0010 b:0010 l:000009 d:000009 CFUNC :kill<br>
c:0003 p:0016 s:0006 b:0006 l:002358 d:000798 EVAL -:1<br>
c:0002 p:---- s:0004 b:0004 l:000003 d:000003 FINISH<br>
c:0001 p:0000 s:0002 b:0002 l:002358 d:002358 TOP</p>
<p>-- Ruby level backtrace information ----------------------------------------<br>
-:1:in <code><main>' -:1:in </code>kill'</p>
<p>-- See Crash Report log file under ~/Library/Logs/CrashReporter or ---------<br>
-- /Library/Logs/CrashReporter, for the more detail of ---------------------<br>
-- C level backtrace information -------------------------------------------</p>
<p>-- Other runtime information -----------------------------------------------</p>
<ul>
<li>
<p>Loaded script: -</p>
</li>
<li>
<p>Loaded features:</p>
<p>0 enumerator.so<br>
1 /Users/agrimm/.rvm/rubies/ruby-head/lib/ruby/1.9.1/x86_64-darwin10.4.0/enc/encdb.bundle<br>
2 /Users/agrimm/.rvm/rubies/ruby-head/lib/ruby/1.9.1/x86_64-darwin10.4.0/enc/trans/transdb.bundle<br>
3 /Users/agrimm/.rvm/rubies/ruby-head/lib/ruby/1.9.1/rubygems/defaults.rb<br>
4 /Users/agrimm/.rvm/rubies/ruby-head/lib/ruby/1.9.1/x86_64-darwin10.4.0/rbconfig.rb<br>
5 /Users/agrimm/.rvm/rubies/ruby-head/lib/ruby/1.9.1/thread.rb<br>
6 /Users/agrimm/.rvm/rubies/ruby-head/lib/ruby/1.9.1/rubygems/exceptions.rb<br>
7 /Users/agrimm/.rvm/rubies/ruby-head/lib/ruby/1.9.1/rubygems/custom_require.rb<br>
8 /Users/agrimm/.rvm/rubies/ruby-head/lib/ruby/1.9.1/rubygems.rb</p>
</li>
</ul>
<p>[NOTE]<br>
You may have encountered a bug in the Ruby interpreter or extension libraries.<br>
Bug reports are welcome.<br>
For details: <a href="http://www.ruby-lang.org/bugreport.html" class="external">http://www.ruby-lang.org/bugreport.html</a></p>
<p>Abort trap<br>
=end</p> Ruby master - Bug #4342 (Closed): YAML raises an exception while parsing certain regular expressionshttps://bugs.ruby-lang.org/issues/43422011-01-29T22:18:06Zagrimm (Andrew Grimm)andrew.j.grimm@gmail.com
<p>=begin<br>
Roundtripping does not work for the regular expresion //n , and this appears to be distinct from Backport87 bug 1639.</p>
<p>irb -d<br>
ruby-head :001 > require "yaml"<br>
Exception <code>NameError' at /Users/agrimm/.rvm/rubies/ruby-head/lib/ruby/1.9.1/syck/tag.rb:81 - method </code>yaml_as' not defined in Module<br>
=> true<br>
ruby-head :002 > Regexp.new('',0,'n')<br>
=> //n<br>
ruby-head :003 > YAML.dump(Regexp.new('',0,'n'))<br>
=> "--- !ruby/regexp //n\n"<br>
ruby-head :004 > YAML.load(YAML.dump(Regexp.new('',0,'n')))<br>
Exception <code>Syck::TypeError' at /Users/agrimm/.rvm/rubies/ruby-head/lib/ruby/1.9.1/syck/rubytypes.rb:283 - Invalid Regular expression: "//n" Exception </code>Syck::TypeError' at /Users/agrimm/.rvm/rubies/ruby-head/lib/ruby/1.9.1/irb/workspace.rb:80 - Invalid Regular expression: "//n"<br>
Syck::TypeError: Invalid Regular expression: "//n"<br>
from /Users/agrimm/.rvm/rubies/ruby-head/lib/ruby/1.9.1/syck/rubytypes.rb:283:in <code>yaml_new' from /Users/agrimm/.rvm/rubies/ruby-head/lib/ruby/1.9.1/syck.rb:135:in </code>transfer'<br>
from /Users/agrimm/.rvm/rubies/ruby-head/lib/ruby/1.9.1/syck.rb:135:in <code>node_import' from /Users/agrimm/.rvm/rubies/ruby-head/lib/ruby/1.9.1/syck.rb:135:in </code>load'<br>
from /Users/agrimm/.rvm/rubies/ruby-head/lib/ruby/1.9.1/syck.rb:135:in <code>load' from (irb):4 from /Users/agrimm/.rvm/rubies/ruby-head/bin/irb:16:in </code>'<br>
ruby-head :005 > # The following works, indicating it's distinct from backport87 bug 1639<br>
ruby-head :006 > YAML.load(YAML.dump(Regexp.new('',0,'u')))<br>
(irb):6: warning: encoding option is ignored - u<br>
=> //<br>
=end</p> Ruby master - Bug #4059 (Closed): String#unpack can segfault when passed a blockhttps://bugs.ruby-lang.org/issues/40592010-11-15T20:47:24Zagrimm (Andrew Grimm)andrew.j.grimm@gmail.com
<p>=begin<br>
Various calls to String#unpack (not just those involving "d") can cause segfaults when passed a block</p>
<p>ruby -e ' "".unpack("d") { true } '<br>
-e:1: [BUG] Segmentation fault<br>
ruby 1.9.2p0 (2010-08-18 revision 29036) [x86_64-darwin10.2.0]</p>
<h2>-- control frame ----------<br>
c:0004 p:---- s:0010 b:0010 l:000009 d:000009 CFUNC :unpack<br>
c:0003 p:0012 s:0006 b:0006 l:001588 d:002478 EVAL -e:1<br>
c:0002 p:---- s:0004 b:0004 l:000003 d:000003 FINISH<br>
c:0001 p:0000 s:0002 b:0002 l:001588 d:001588 TOP</h2>
<p>-- Ruby level backtrace information ----------------------------------------<br>
-e:1:in <code><main>' -e:1:in </code>unpack'</p>
<p>-- C level backtrace information -------------------------------------------</p>
<p>[NOTE]<br>
You may have encountered a bug in the Ruby interpreter or extension libraries.<br>
Bug reports are welcome.<br>
For details: <a href="http://www.ruby-lang.org/bugreport.html" class="external">http://www.ruby-lang.org/bugreport.html</a></p>
<p>Abort trap<br>
=end</p> Ruby 1.8 - Bug #3997 (Rejected): Warning about using Fixnums as Symbols does not honor $VERBOSEhttps://bugs.ruby-lang.org/issues/39972010-10-28T21:38:52Zagrimm (Andrew Grimm)andrew.j.grimm@gmail.com
<p>=begin<br>
If you use a Fixnum as a symbol, you get a warning regardless of $VERBOSE</p>
<p>ruby-1.8.7-p302 > puts $VERBOSE<br>
false<br>
=> nil<br>
ruby-1.8.7-p302 > "string".send(:reverse.to_i)<br>
(irb):2: warning: do not use Fixnums as Symbols<br>
=> "gnirts"<br>
=end</p> Ruby master - Bug #3634 (Closed): irb -d does not set $VERBOSE to truehttps://bugs.ruby-lang.org/issues/36342010-07-31T10:22:16Zagrimm (Andrew Grimm)andrew.j.grimm@gmail.com
<p>=begin<br>
Thanks to feature <a class="issue tracker-2 status-5 priority-4 priority-default closed" title="Feature: irb -w (Closed)" href="https://bugs.ruby-lang.org/issues/1832">#1832</a>, irb -w sets $VERBOSE to true. However, this did not update irb -d to setting $VERBOSE to true.</p>
<p>If irb -w sets $VERBOSE to true, and ruby -d sets $VERBOSE (as well as $DEBUG) to true, then irb -d should set $VERBOSE (as well as $DEBUG) to true.</p>
<p>Attached is a patch that should set $VERBOSE to true for "irb -d" (I haven't tested it myself). I did not add any unit tests because I couldn't find an equivalent of test/ruby/test_parse.rb for irb.<br>
=end</p> Ruby 1.8 - Bug #2345 (Closed): RDoc improvement for Test::Unithttps://bugs.ruby-lang.org/issues/23452009-11-08T15:39:12Zagrimm (Andrew Grimm)andrew.j.grimm@gmail.com
<p>=begin<br>
For ruby 1.8, lib/test/unit.rb, Test::Unit.run should be changed to having</p>
<p>#Set +true+ to indicate that Test::Unit has been run.<br>
#If set to +true+, Test::Unit will not automatically run at exit</p>
<p>and Test::Unit.run? should be changed to having</p>
<p>#Tests have already been run?</p>
<p>to fix the grammar of the documentation.<br>
=end</p>