Article 511. When any robbery falling within the terms of article five hundred and eight shall have been committed in any dependency of an inhabited house, public building, or edifice devoted to religious worship, and the offender shall have gained entrance by scaling any exterior wall, but shall not have taken anything except cereals, fruits, or firewood, not exceeding in value sixty-five pesetas, a penalty ranging from arresto mayor in its medium degree to presidio correccional in its minimum degree shall be imposed.