##Issue ffi/ffi#245
TypeError: no implicit conversion from nil to integer
##Platform
uname -a
Darwin dbutler.local 12.2.0 Darwin Kernel Version 12.2.0: Sat Aug 25 00:48:52 PDT 2012; root:xnu-2050.18.24~1/RELEASE_X86_64 x86_64
| RUBY_VERSION | |
| # => "2.1.1" | |
| require 'benchmark' | |
| DEFAULT_OPTIONS = {validate: true} | |
| def default_options | |
| {validate: true} | |
| end |
| require 'benchmark' | |
| Benchmark.bm {|x| x.report { 1_000.times { defined?(::UNF::Normalizer) } } } | |
| user system total real | |
| 0.300000 0.010000 0.310000 ( 0.340000) |
| namespace :db do | |
| desc 'Open a MongoDB console with connection parameters for the current Rails.env' | |
| task :console, [:session] => :environment do |t, args| | |
| session_name = args[:session] || :default | |
| config = Mongoid.sessions[session_name] | |
| username = config[:username] | |
| password = config[:password] | |
| database = config[:database] |
| rvm use jruby | |
| gem install json | |
| Successfully installed json-1.7.6-java | |
| 1 gem installed | |
| # Uses JSON prepackaged with JRuby? | |
| ➜ ~ jruby -r 'json' -r 'active_support/hash_with_indifferent_access' -e "puts JSON::VERSION; puts JSON.dump HashWithIndifferentAccess.new" | |
| 1.7.5 | |
| {} |
| # Tested in Ruby 1.8.7 | |
| class ParentClass | |
| def call_private_good | |
| # Private methods can only be called without an explicit receiver | |
| private_test | |
| end | |
| def call_private_bad | |
| # Calling a private method with an explicit receiver (self) will fail |
##Issue ffi/ffi#245
TypeError: no implicit conversion from nil to integer
##Platform
uname -a
Darwin dbutler.local 12.2.0 Darwin Kernel Version 12.2.0: Sat Aug 25 00:48:52 PDT 2012; root:xnu-2050.18.24~1/RELEASE_X86_64 x86_64
| uname -a | |
| Darwin dbutler-mac-2.local 12.2.0 Darwin Kernel Version 12.2.0: Sat Aug 25 00:48:52 PDT 2012; root:xnu-2050.18.24~1/RELEASE_X86_64 x86_64 |