Skip to content

Instantly share code, notes, and snippets.

Avatar

Brian Shirai brixen

View GitHub Profile
View gist:9106890
vagrant@precise64:~/devel/nokogiri$ ack 0x7fffe0200b00 xml.debug
alloc: 0x7fffe0200b00
wrap: 0x7fffe0200b00
mark: 0x7fffe0200b00
free: 0x7fffe0200b00
free: 0x7fffe0200b00
free: 0x7fffe0200b00
free: 0x7fffe0200b00
mark: 0x7fffe0200b00
0x00007fffef7da8d2 in mark (node=0x7fffe0200b00) at xml_node.c:26
View nokogiri_1047.diff
diff --git a/ext/nokogiri/html_document.c b/ext/nokogiri/html_document.c
index 3e8e8ec..1f327c1 100644
--- a/ext/nokogiri/html_document.c
+++ b/ext/nokogiri/html_document.c
@@ -65,6 +65,7 @@ static VALUE read_io( VALUE klass,
if (rb_respond_to(io, id_encoding_found)) {
VALUE encoding_found = rb_funcall(io, id_encoding_found, 0);
if (!NIL_P(encoding_found)) {
+fprintf(stderr, "html_document: read_io: %p\n", doc);
xmlFreeDoc(doc);
View gist:9347066
ssh-dss AAAAB3NzaC1kc3MAAACBAPR6E5HYKF3asWmfeEU3Jl5y+AZo5wbf1T075RcoEcY4I3o/YuwzY5np57gvlfm/EXHUVDmFE/EE3q5E0cGgYE9UwknzD6N9+jHul0gzWXabC0FCGZPNrlD0fM0Z9H1r/DFimVP5Ko8qOIZkTWbMjTDrNnyQHxUYj5fvjuYmwG1rAAAAFQDKxdRt6QTo28ursPc8iMgORDPw1QAAAIEAhIO1/kL7wZy3rd+RHdS1tBBRHjPwKlJW980VkVakP1b/ZnxtHvajxdFSVVpibBA/puIoeeeKaQCuv3YgdCzalrWD6OB6n5o48lC4k9kbf/CRYuyA02eqk/6ZQ/pEHXB3Exy4aEoJC7WlM+8PAy52eo/nSLXIEsrRywebZj+VqP0AAACABEyYAMzXk6gB/U+XwxprWa3qyy9RrdPbQsgd9LsWPPJKQCXrAgaCr9UUjO2fXzfu8Hz4k28+fHzREbpkv5y8HXcSIJo45IhdVMMSLkXPEMxT41EL47pNJVv3v/tMqOovbbmAOCKYhU3SacaK29ugG9fJLogIi88RWZ+EXkJT3i0= brixen@gmail.com
View gist:9512602
cd /tmp
curl -O http://binaries.rubini.us/osx/10.9/x86_64/rubinius-2.2.6.tar.bz2
tar -xjf rubinius-2.2.6.tar.bz2
mv rubinius/2.2.6 ~/.rubies/rbx-2.2.6
rm -r rubinius rubinius-2.2.6.tar.bz2
View gist:9530938
** Invoke default (first_time)
** Invoke spec (first_time)
** Invoke build (first_time)
** Invoke build:build (first_time)
** Invoke build:llvm (first_time)
** Execute build:llvm
** Invoke vm/vm (first_time)
** Invoke vm/gen/config_variables.h (first_time, not_needed)
** Invoke library/rubinius/configuration.rb (first_time, not_needed)
** Invoke config.rb (first_time, not_needed)
View gist:9621386
diff --git a/library/rubygems/basic_specification.rb b/library/rubygems/basic_specification.rb
index 470a6eb..2ad6e7a 100644
--- a/library/rubygems/basic_specification.rb
+++ b/library/rubygems/basic_specification.rb
@@ -53,8 +53,6 @@ class Gem::BasicSpecification
# Return true if this spec can require +file+.
def contains_requirable_file? file
- build_extensions
-
View gist:038fc8f5dcf7dfae2dcc
$ echo $LANG
$ echo $LC_ALL
i$ ruby -v -e 'p Encoding.default_external, File.read("hello/hello.md").encoding'
ruby 2.1.0p0 (2013-12-25 revision 44422) [x86_64-darwin13.0]
#<Encoding:US-ASCII>
#<Encoding:US-ASCII>
$ export LC_ALL=en_US.UTF-8
$ ruby -v -e 'p Encoding.default_external, File.read("hello/hello.md").encoding'
View 0. WTF.markdown

I ran this in Rubinius (rubinius 2.2.6.n78 (2.1.0 ac8f0e2f 2014-03-19 JI) [x86_64-darwin13.1.0]) and MRI 2.1.0 (ruby 2.1.0p0 (2013-12-25 revision 44422) [x86_64-darwin13.0])

These two lines in the backtraces refer to the same source code location in Parade:

The next line in the Rubinius backtrace follows (ie, we are in String#gsub): https://github.com/rubinius/rubinius/blob/master/kernel/common/string.rb#L1686

I have no clue (with superficial inspection) how we get to the next line in MRI: https://github.com/burtlo/parade/blob/master/lib/parade/parsers/dsl.rb#L36

@brixen
brixen / gist:4af79e1e325f1d7e51f1
Created May 14, 2014
Notes on the trusted @docker Rubinius image
View gist:4af79e1e325f1d7e51f1
You can’t perform that action at this time.