Browse files

only require core for bin/rib, not for, see:

at first i want to give people core plugins automatically
if you're not using any plugin. so that using `rib` directly
would give you an irb like session. but this is buggy :(

if there's a program:

    require 'rib/more/anchor'
    Rib.anchor 123

then this would crash, because we ended up with plugins:
(crash reason is that Anchor is not overriding Underscore!)

    [Rib::Anchor, Rib::Underscore]

but it should be:

    [Rib::Underscore, Rib::Anchor]

or merely:


we can't really detect if we would want core plugins when
calling ``, so this is too messy!

thanks andrew
  • Loading branch information...
1 parent 277b631 commit 7a97441afeecae80f5493f4e8a4a6ba3044e2c33 @godfat committed Aug 26, 2011
Showing with 2 additions and 5 deletions.
  1. +1 −0 bin/rib
  2. +1 −5 lib/rib.rb
@@ -1,4 +1,5 @@
#!/usr/bin/env ruby
require 'rib/runner'
+require 'rib/core'
@@ -35,11 +35,7 @@ def home
# need a clean shell which does not load rc file, use instead.
def shell
shells.last || begin
- if config_path
- require_config
- else # for those who don't have a config, we use core plugins
- require 'rib/core'
- end
+ require_config if config_path
(shells <<

0 comments on commit 7a97441

Please sign in to comment.