Error in PORTB pic18f2550
From the posted code, it seems you only "half-enabled" pullups by clearing INTCON2[!RBPU].  To really enable them, you also have to set the corresponding LATB bits.

From the pic18f2550 datasheet:


  RBPU: PORTB Pull-up Enable bit
        1 = All PORTB pull-ups are disabled
        0 = PORTB pull-ups are enabled by individual port latch values


In your code you cleared LATB, effectively disabling the pullups.