This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh -e | |
zipfile="$1" | |
dir="$2" | |
if test -z "$2"; then | |
echo "USAGE: $0 ZIPFILE DIR" | |
exit | |
fi |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Traceback (most recent call last): | |
File "phonenumber_util.py", line 4, in <module> | |
data.ParseFromString(open('data/PhoneNumberMetadataProto_US').read()) | |
File "/usr/lib/pymodules/python2.6/google/protobuf/message.py", line 168, in ParseFromString | |
self.MergeFromString(serialized) | |
File "/usr/lib/pymodules/python2.6/google/protobuf/reflection.py", line 824, in MergeFromString | |
raise message_mod.DecodeError('Unexpected end-group tag.') | |
google.protobuf.message.DecodeError: Unexpected end-group tag. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# OAuth desktop client example | |
require 'oauth' | |
CONSUMER_KEY = 'xxxx' | |
CONSUMER_SECRET = 'xxxx' | |
access_token = nil | |
access_secret = nil |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
diff --git a/lib/protobuf/message/message.rb b/lib/protobuf/message/message.rb | |
index 3083618..856a128 100644 | |
--- a/lib/protobuf/message/message.rb | |
+++ b/lib/protobuf/message/message.rb | |
@@ -120,7 +120,7 @@ module Protobuf | |
def initialize(values={}) | |
@values = {} | |
- self.class.fields.each do |tag, field| | |
+ self.class.fields.to_a.each do |tag, field| |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
require 'delegate' | |
class EnumValue < SimpleDelegator | |
def initialize(name, value) | |
@name = name | |
@value = value | |
super(@value) | |
end | |
def to_s |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[ERROR] #<Class:0x7fc3f0c50ec0>: execution expired | |
[ERROR] #<Class:0x7fc3f0cb9c40>: execution expired | |
[ERROR] #<Class:0x7fc3f0cb2a30>: execution expired | |
/usr/lib/ruby/1.8/timeout.rb:60: [BUG] Segmentation fault | |
ruby 1.8.7 (2008-08-11 patchlevel 72) [x86_64-linux] | |
zsh: abort termtter |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Column-level collation support for DataMapper/MySQL | |
# | |
# e.g.) | |
# property :name, String, :collate => 'utf8_bin' | |
gem 'dm-core', '0.10.0' | |
require 'dm-core' | |
require 'dm-core/adapters/mysql_adapter' |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
diff --git a/data_objects/lib/data_objects/spec/encoding_spec.rb b/data_objects/lib/data_objects/spec/encoding_spec.rb | |
index 4b14e17..de3a974 100644 | |
--- a/data_objects/lib/data_objects/spec/encoding_spec.rb | |
+++ b/data_objects/lib/data_objects/spec/encoding_spec.rb | |
@@ -40,4 +40,43 @@ share_examples_for 'a driver supporting encodings' do | |
end | |
+ | |
+ if defined?(::Encoding) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
diff --git a/data_objects/lib/data_objects/spec/encoding_spec.rb b/data_objects/lib/data_objects/spec/encoding_spec.rb | |
index 4b14e17..de3a974 100644 | |
--- a/data_objects/lib/data_objects/spec/encoding_spec.rb | |
+++ b/data_objects/lib/data_objects/spec/encoding_spec.rb | |
@@ -40,4 +40,43 @@ share_examples_for 'a driver supporting encodings' do | |
end | |
+ | |
+ if defined?(::Encoding) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
diff --git a/do_sqlite3/ext/do_sqlite3_ext/do_sqlite3_ext.c b/do_sqlite3/ext/do_sqlite3_ext/do_sqlite3_ext.c | |
index 87923d5..f62f8e8 100755 | |
--- a/do_sqlite3/ext/do_sqlite3_ext/do_sqlite3_ext.c | |
+++ b/do_sqlite3/ext/do_sqlite3_ext/do_sqlite3_ext.c | |
@@ -604,6 +604,9 @@ static VALUE cCommand_execute_reader(int argc, VALUE *argv, VALUE self) { | |
rb_iv_set(reader, "@reader", Data_Wrap_Struct(rb_cObject, 0, 0, sqlite3_reader)); | |
rb_iv_set(reader, "@field_count", INT2NUM(field_count)); | |
+#ifdef HAVE_RUBY_ENCODING_H | |
+ rb_iv_set(reader, "@connection", conn_obj); |